{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/anaconda/envs/unet/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88\n",
      "  return f(*args, **kwds)\n",
      "/anaconda/envs/unet/lib/python3.6/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__\n",
      "  return f(*args, **kwds)\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/skimage/__init__.py:80: ResourceWarning: unclosed file <_io.TextIOWrapper name='/anaconda/envs/unet/lib/python3.6/site-packages/pytest.py' mode='r' encoding='utf-8'>\n",
      "  imp.find_module('pytest')\n",
      "/anaconda/envs/unet/lib/python3.6/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__\n",
      "  return f(*args, **kwds)\n",
      "/anaconda/envs/unet/lib/python3.6/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__\n",
      "  return f(*args, **kwds)\n",
      "/anaconda/envs/unet/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88\n",
      "  return f(*args, **kwds)\n",
      "Using TensorFlow backend.\n",
      "/anaconda/envs/unet/lib/python3.6/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__\n",
      "  return f(*args, **kwds)\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/tensorflow/python/util/tf_inspect.py:75: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()\n",
      "  return _inspect.getargspec(target)\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/tensorflow/python/keras/backend.py:4900: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/vjain/.keras/keras.json' mode='r' encoding='UTF-8'>\n",
      "  _config = json.load(open(_config_path))\n"
     ]
    }
   ],
   "source": [
    "### Import packages\n",
    "# Processing\n",
    "import glob\n",
    "import os\n",
    "import SimpleITK as sitk\n",
    "import numpy as np\n",
    "import tables\n",
    "import nibabel\n",
    "from matplotlib import pyplot as plt \n",
    "from nilearn import plotting\n",
    "import pandas as pd\n",
    "# Model\n",
    "import skimage.io as io\n",
    "import skimage.transform as trans\n",
    "from keras.models import *\n",
    "from keras.layers import *\n",
    "from keras.optimizers import *\n",
    "from keras.callbacks import ModelCheckpoint, LearningRateScheduler\n",
    "from keras import backend as keras\n",
    "from keras.models import Sequential\n",
    "from keras.layers import Dense\n",
    "# HDF5\n",
    "from keras.utils.io_utils import HDF5Matrix\n",
    "import h5py\n",
    "# Generator\n",
    "from random import shuffle\n",
    "import pickle"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Input shape (32, 32, 32, 4)\n"
     ]
    }
   ],
   "source": [
    "## Dictionary\n",
    "config = dict()\n",
    "config[\"image_shape\"] = (32,32,32)#(144, 144, 144) \n",
    "config[\"labels\"] = (1, 2, 4)  # the label numbers on the input image\n",
    "config[\"n_labels\"] = len(config[\"labels\"])\n",
    "config[\"all_modalities\"] = [\"t1\", \"t1ce\", \"flair\", \"t2\"]\n",
    "config[\"training_modalities\"] = config[\"all_modalities\"]  \n",
    "config[\"nb_channels\"] = len(config[\"training_modalities\"])\n",
    "config[\"input_shape\"] = tuple(list(config[\"image_shape\"])+[config[\"nb_channels\"]])\n",
    "print('Input shape',config['input_shape'])\n",
    "config['data_file']=os.path.join('/home/vjain/notebooks/3DUnetCNN/brats','brats_data.h5')\n",
    "data_file=config['data_file']\n",
    "config[\"training_file\"] = os.path.join('/home/vjain/notebooks/3DUnetCNN/brats',\"training_ids.pkl\")\n",
    "config[\"validation_file\"] = os.path.join('/home/vjain/notebooks/3DUnetCNN/brats',\"validation_ids.pkl\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Declare relations\n",
    "validation_keys_file=config[\"validation_file\"],\n",
    "training_keys_file=config[\"training_file\"],\n",
    "n_labels=config[\"n_labels\"],\n",
    "n_labels,=n_labels\n",
    "labels=config[\"labels\"],\n",
    "training_file=training_keys_file\n",
    "validation_file=validation_keys_file"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Define Data generator: Training and Validation -- Batch_size 1\n",
    "\n",
    "def data_gen(data_file, ids_file, labels, batch_size=1): \n",
    "    \n",
    "     with (open(ids_file, \"rb\")) as keys_file, open(data_file,'rb') as data_file:\n",
    "        \n",
    "        # Load indices: Train/Val\n",
    "        index_file=pickle.load(keys_file)\n",
    "        orig_index_list = index_file\n",
    "        # Define Data and Target lists\n",
    "        x_list = list()\n",
    "        y_list = list()\n",
    "        index_file= list(copy.copy(orig_index_list))\n",
    "        print('index_list',index_file)\n",
    "        shuffle_index_list=True\n",
    "        if shuffle_index_list:\n",
    "            shuffle(index_file)\n",
    "        while len(index_file) > 0:\n",
    "                index = index_file.pop()\n",
    "                print('index',index)\n",
    "                # Extract training data corresponding to indices\n",
    "                for idx in index_file:\n",
    "                    X_data = HDF5Matrix(data_file, 'data',0,None)\n",
    "                    X_data=X_data[idx]\n",
    "                    print('X_data.shape',X_data.shape)\n",
    "                    X_data=np.reshape(X_data,(X_data.shape[1],X_data.shape[2],X_data.shape[3],X_data.shape[0]))\n",
    "                    Y_mask = HDF5Matrix(data_file, 'truth',0,None)\n",
    "                    Y_mask=Y_mask[idx]\n",
    "                    Y_mask=np.reshape(Y_mask,(Y_mask.shape[1],Y_mask.shape[2],Y_mask.shape[3],Y_mask.shape[0]))\n",
    "                    print('Reshaped data',X_data.shape)\n",
    "                    print('Reshaped mask',Y_mask.shape)\n",
    "                    x_list.append(X_data)\n",
    "                    y_list.append(Y_mask)\n",
    "                    # Convert HDF5 data to numpy arrays\n",
    "                    x = np.asarray(x_list)\n",
    "                    y = np.asarray(y_list)\n",
    "                    print('x',x.shape)\n",
    "                    print('y', y.shape)\n",
    "                    if len(x) == batch_size or len(x) > 0:\n",
    "                        # Translate labels to binary\n",
    "                        n_labels=3\n",
    "                        labels=config[\"labels\"]\n",
    "                        new_shape = [y.shape[0],n_labels] + list(y.shape[1:4])\n",
    "                    \n",
    "                        y_new= np.zeros(new_shape, np.int8)\n",
    "                        print('y_new',y_new.shape)\n",
    "                        for label_index in range(n_labels):\n",
    "                            if labels is not None:\n",
    "                                y_new[:, label_index][y_new[:, 0] == labels[label_index]] = 1\n",
    "                            else:\n",
    "                                y_new[:, label_index][y_new[:, 0] == (label_index + 1)] = 1\n",
    "                        print('y_new shape in multiclass',y_new.shape)\n",
    "                    \n",
    "                    #y_reshape=np.reshape(y_new,(y_new.shape[3],y_new.shape[2],y_new.shape[1],y_new.shape[0],y.shape[0]))\n",
    "                    #y_reshape=np.reshape(y_new,(y_new.shape[3],y_new.shape[2],y_new.shape[1],y_new.shape[0],n_labels))\n",
    "                    #y_reshape=np.reshape(y_new,(y.shape[0],y_new.shape[3],y_new.shape[2],y_new.shape[1],y_new.shape[0]))#y.shape[0]))\n",
    "                    \n",
    "                        y_reshape=np.reshape(y_new,(-1,y_new.shape[2],y_new.shape[3],y_new.shape[4],y_new.shape[1]))#y.shape[0]))\n",
    "                        print('reshaped y',y_reshape.shape)\n",
    "                    \n",
    "                    #x_reshape=np.reshape(x,(-1,x.shape[3],x.shape[2],x.shape[1],x.shape[4]))\n",
    "                    #print('reshaped_x',x_reshape.shape)\n",
    "                    \n",
    "                    \n",
    "                        yield x,y_reshape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Define 3DUnet model\n",
    "import numpy as np\n",
    "import os\n",
    "import skimage.io as io\n",
    "import skimage.transform as trans\n",
    "import numpy as np\n",
    "from keras.models import *\n",
    "from keras.layers import *\n",
    "from keras.optimizers import *\n",
    "from keras.callbacks import ModelCheckpoint, LearningRateScheduler\n",
    "from keras import backend as keras\n",
    "\n",
    "def unet_model_3d(input_shape):\n",
    "    print('input_shape',input_shape)\n",
    "    inputs = Input(input_shape)\n",
    "    print('input',inputs.shape)\n",
    "    #1\n",
    "    conv1 = Conv3D(32, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(inputs)\n",
    "    print('conv1',conv1.shape)\n",
    "    #2\n",
    "    conv1 = Conv3D(64, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(conv1)\n",
    "    print('conv_1',conv1.shape)\n",
    "    pool1 = MaxPooling3D(pool_size=(2, 2, 2),dim_ordering='tf')(conv1)\n",
    "    print('pool1',pool1.shape)\n",
    "    #3\n",
    "    conv2 = Conv3D(64, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(pool1)\n",
    "    print('conv2',conv2.shape)\n",
    "    #4\n",
    "    conv2 = Conv3D(128, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(conv2)\n",
    "    print('conv_2',conv2.shape)\n",
    "    pool2 = MaxPooling3D(pool_size=(2, 2, 2),dim_ordering='tf')(conv2)\n",
    "    print('pool2',pool2.shape)\n",
    "    #5\n",
    "    conv3 = Conv3D(128, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(pool2)\n",
    "    print('conv3',conv3.shape)\n",
    "    #6\n",
    "    conv3 = Conv3D(256, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(conv3)\n",
    "    print('conv_3',conv3.shape)\n",
    "    pool3 = MaxPooling3D(pool_size=(2, 2, 2),dim_ordering='tf')(conv3)\n",
    "    print('pool3',pool3.shape)\n",
    "    #7\n",
    "    conv4 = Conv3D(256, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(pool3)\n",
    "    print('conv4',conv4.shape)\n",
    "    #8\n",
    "    conv4 = Conv3D(256, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(conv4)\n",
    "    print('conv_4',conv4.shape)\n",
    "    drop4 = Dropout(0.5)(conv4)\n",
    "    print('drop4',drop4.shape)\n",
    "    #9\n",
    "    up5 = Conv3D(256, 2, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(UpSampling3D(size = (2,2,2),dim_ordering='tf')(drop4))\n",
    "    print('up5',up5.shape)\n",
    "    merge5 = concatenate([conv3,up5])\n",
    "    print('merge5',merge5.shape)\n",
    "    #10\n",
    "    conv5 = Conv3D(256, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(merge5)\n",
    "    print('conv5',conv5.shape)\n",
    "    #11\n",
    "    conv5 = Conv3D(256, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(conv5)\n",
    "    print('conv_5',conv5.shape)\n",
    "    drop5=Dropout(0.5)(conv5)\n",
    "    print('drop5',drop5.shape)\n",
    "    #12\n",
    "    up6 = Conv3D(256, 2, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(UpSampling3D(size = (2,2,2),dim_ordering='tf')(drop5))\n",
    "    print('up6',up6.shape)\n",
    "    merge6 = concatenate([conv2,up6])\n",
    "    print('merge6',merge6.shape)\n",
    "    #13\n",
    "    conv6 = Conv3D(128, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(merge6)\n",
    "    print('conv6',conv6.shape)\n",
    "    #14\n",
    "    conv6 = Conv3D(128, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(conv6)\n",
    "    print('conv_6',conv6.shape)\n",
    "    #15\n",
    "    up7 = Conv3D(128, 2, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(UpSampling3D(size = (2,2,2),dim_ordering='tf')(conv6))\n",
    "    print('up7',up7.shape)\n",
    "    merge7 = concatenate([conv1,up7])\n",
    "    print('merge7',merge7.shape)\n",
    "    #16\n",
    "    conv7 = Conv3D(64, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(merge7)\n",
    "    print('conv7',conv7.shape)\n",
    "    #17\n",
    "    conv7 = Conv3D(64, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(conv7)\n",
    "    print('conv_7',conv7.shape)\n",
    "    #18\n",
    "    conv8 = Conv3D(4, 3, activation = 'relu', padding = 'same', kernel_initializer = 'he_normal',dim_ordering='tf')(conv7)\n",
    "    print('conv8',conv8.shape)\n",
    "    #19\n",
    "    conv9 = Conv3D(3, 1, activation = 'sigmoid',dim_ordering='tf')(conv8)\n",
    "    print('conv9',conv9.shape)\n",
    "    model = Model(input = inputs, output = conv9)\n",
    "\n",
    "    model.compile(optimizer = Adam(lr = 1e-4), loss = 'binary_crossentropy', metrics = ['accuracy'])\n",
    "    config[\"model_file\"] = model.save('/home/vjain/notebooks/3DUnetCNN/brats/tumor_model.h5')\n",
    "    return model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "input_shape (32, 32, 32, 4)\n",
      "input (?, 32, 32, 32, 4)\n",
      "conv1 (?, 32, 32, 32, 32)\n",
      "conv_1 (?, 32, 32, 32, 64)\n",
      "pool1 (?, 16, 16, 16, 64)\n",
      "conv2 (?, 16, 16, 16, 64)\n",
      "conv_2 (?, 16, 16, 16, 128)\n",
      "pool2 (?, 8, 8, 8, 128)\n",
      "conv3 (?, 8, 8, 8, 128)\n",
      "conv_3 (?, 8, 8, 8, 256)\n",
      "pool3 (?, 4, 4, 4, 256)\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:18: UserWarning: Update your `Conv3D` call to the Keras 2 API: `Conv3D(32, 3, activation=\"relu\", padding=\"same\", kernel_initializer=\"he_normal\", data_format=\"channels_last\")`\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:21: UserWarning: Update your `Conv3D` call to the Keras 2 API: `Conv3D(64, 3, activation=\"relu\", padding=\"same\", kernel_initializer=\"he_normal\", data_format=\"channels_last\")`\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:23: UserWarning: Update your `MaxPooling3D` call to the Keras 2 API: `MaxPooling3D(pool_size=(2, 2, 2), data_format=\"channels_last\")`\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:29: UserWarning: Update your `Conv3D` call to the Keras 2 API: `Conv3D(128, 3, activation=\"relu\", padding=\"same\", kernel_initializer=\"he_normal\", data_format=\"channels_last\")`\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:37: UserWarning: Update your `Conv3D` call to the Keras 2 API: `Conv3D(256, 3, activation=\"relu\", padding=\"same\", kernel_initializer=\"he_normal\", data_format=\"channels_last\")`\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "conv4 (?, 4, 4, 4, 256)\n",
      "conv_4 (?, 4, 4, 4, 256)\n",
      "drop4 (?, 4, 4, 4, 256)\n",
      "up5 (?, 8, 8, 8, 256)\n",
      "merge5 (?, 8, 8, 8, 512)\n",
      "conv5 (?, 8, 8, 8, 256)\n",
      "conv_5 (?, 8, 8, 8, 256)\n",
      "drop5 (?, 8, 8, 8, 256)\n",
      "up6 (?, 16, 16, 16, 256)\n",
      "merge6 (?, 16, 16, 16, 384)\n",
      "conv6 (?, 16, 16, 16, 128)\n",
      "conv_6 (?, 16, 16, 16, 128)\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:50: UserWarning: Update your `Conv3D` call to the Keras 2 API: `Conv3D(256, 2, activation=\"relu\", padding=\"same\", kernel_initializer=\"he_normal\", data_format=\"channels_last\")`\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:50: UserWarning: Update your `UpSampling3D` call to the Keras 2 API: `UpSampling3D(size=(2, 2, 2), data_format=\"channels_last\")`\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:74: UserWarning: Update your `Conv3D` call to the Keras 2 API: `Conv3D(128, 2, activation=\"relu\", padding=\"same\", kernel_initializer=\"he_normal\", data_format=\"channels_last\")`\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "up7 (?, 32, 32, 32, 128)\n",
      "merge7 (?, 32, 32, 32, 192)\n",
      "conv7 (?, 32, 32, 32, 64)\n",
      "conv_7 (?, 32, 32, 32, 64)\n",
      "conv8 (?, 32, 32, 32, 4)\n",
      "conv9 (?, 32, 32, 32, 3)\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:85: UserWarning: Update your `Conv3D` call to the Keras 2 API: `Conv3D(4, 3, activation=\"relu\", padding=\"same\", kernel_initializer=\"he_normal\", data_format=\"channels_last\")`\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:88: UserWarning: Update your `Conv3D` call to the Keras 2 API: `Conv3D(3, 1, activation=\"sigmoid\", data_format=\"channels_last\")`\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/ipykernel_launcher.py:90: UserWarning: Update your `Model` call to the Keras 2 API: `Model(inputs=Tensor(\"in..., outputs=Tensor(\"co...)`\n",
      "/anaconda/envs/unet/lib/python3.6/site-packages/keras/utils/data_utils.py:651: DeprecationWarning: `wait_time` is not used anymore.\n",
      "  DeprecationWarning)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 1/2\n",
      "index_list [39, 5, 61, 59, 46, 1, 10, 64, 48, 29, 28, 12, 43, 42, 22, 19, 0, 15, 13, 53, 41, 17, 18, 6, 20, 9, 50, 30, 55, 14, 35, 7, 38, 4, 51, 33, 3, 57, 21, 32, 26, 54, 60, 63, 25, 24, 52, 27, 47, 44, 16, 62]\n",
      "index 16\n",
      "index_list [40, 34, 8, 2, 45, 31, 37, 49, 23, 36, 58, 56, 11]\n",
      "index 49\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "xReshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      " (1, 32, 32, 32, 4)\n",
      "y (1, 32, 32, 32, 1)\n",
      "x (1, 32, 32, 32, 4)\n",
      "y (1, 32, 32, 32, 1)\n",
      "y_new (1, 3, 32, 32, 32)\n",
      "y_new (1, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (1, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (1, 3, 32, 32, 32)\n",
      "reshaped y (1, 32, 32, 32, 3)\n",
      "reshaped y (1, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (2, 32, 32, 32, 4)\n",
      "y (2, 32, 32, 32, 1)\n",
      "x (2, 32, 32, 32, 4)\n",
      "y (2, 32, 32, 32, 1)\n",
      "y_new (2, 3, 32, 32, 32)\n",
      "y_newy_new shape in multiclass (2, 3, 32, 32, 32)\n",
      "reshaped y (2, 32, 32, 32, 3)\n",
      " (2, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (2, 3, 32, 32, 32)\n",
      "reshaped y (2, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "X_data.shapeReshaped data  (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)(4, 32, 32, 32)\n",
      "\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (3, 32, 32, 32, 4)\n",
      "y (3, 32, 32, 32, 1)\n",
      "x (3, 32, 32, 32, 4)\n",
      "y (3, 32, 32, 32, 1)\n",
      "y_new (3, 3, 32, 32, 32)\n",
      "y_new (3, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (3, 3, 32, 32, 32)\n",
      "reshaped y (3, 32, 32, 32, 3)\n",
      "y_new shape in multiclass (3, 3, 32, 32, 32)\n",
      "reshaped y (3, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped dataReshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      " (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (4, 32, 32, 32, 4)\n",
      "y (4, 32, 32, 32, 1)\n",
      "y_new (4, 3, 32, 32, 32)\n",
      "x (4, 32, 32, 32, 4)\n",
      "y (4, 32, 32, 32, 1)\n",
      "y_new (4, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (4, 3, 32, 32, 32)\n",
      "reshaped y (4, 32, 32, 32, 3)\n",
      "y_new shape in multiclass (4, 3, 32, 32, 32)\n",
      "reshaped y (4, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped dataReshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      " (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (5, 32, 32, 32, 4)\n",
      "y (5, 32, 32, 32, 1)\n",
      "y_new (5, 3, 32, 32, 32)\n",
      "x (5, 32, 32, 32, 4)\n",
      "y (5, 32, 32, 32, 1)\n",
      "y_new (5, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (5, 3, 32, 32, 32)\n",
      "reshaped y (5, 32, 32, 32, 3)\n",
      "y_new shape in multiclass (5, 3, 32, 32, 32)\n",
      "reshaped y (5, 32, 32, 32, 3)\n",
      "X_data.shapeX_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      " (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (6, 32, 32, 32, 4)\n",
      "y (6, 32, 32, 32, 1)\n",
      "y_new (6, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (6, 3, 32, 32, 32)\n",
      "reshaped y (6, 32, 32, 32, 3)\n",
      "x (6, 32, 32, 32, 4)\n",
      "y (6, 32, 32, 32, 1)\n",
      "y_new (6, 3, 32, 32, 32)\n",
      "X_data.shapey_new shape in multiclass (6, 3, 32, 32, 32)\n",
      "reshaped y (6, 32, 32, 32, 3)\n",
      " (4, 32, 32, 32)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped dataReshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      " (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (7, 32, 32, 32, 4)\n",
      "y (7, 32, 32, 32, 1)\n",
      "y_new (7, 3, 32, 32, 32)\n",
      "y_new shape in multiclassx (7, 3, 32, 32, 32)\n",
      "reshaped y (7, 32, 32, 32, 3)\n",
      " (7, 32, 32, 32, 4)\n",
      "y (7, 32, 32, 32, 1)\n",
      "y_new (7, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (7, 3, 32, 32, 32)\n",
      "reshaped y (7, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "X_data.shapeReshaped data (32, 32, 32, 4)\n",
      "Reshaped mask  (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "(32, 32, 32, 1)\n",
      "x x (8, 32, 32, 32, 4)\n",
      "y (8, 32, 32, 32, 1)\n",
      "(8, 32, 32, 32, 4)\n",
      "y (8, 32, 32, 32, 1)\n",
      "y_new (8, 3, 32, 32, 32)\n",
      "y_new (8, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (8, 3, 32, 32, 32)\n",
      "reshaped y (8, 32, 32, 32, 3)\n",
      "y_new shape in multiclass (8, 3, 32, 32, 32)\n",
      "reshaped y (8, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "X_data.shapeReshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      " (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (9, 32, 32, 32, 4)\n",
      "y (9, 32, 32, 32, 1)\n",
      "y_new (9, 3, 32, 32, 32)\n",
      "x (9, 32, 32, 32, 4)\n",
      "y (9, 32, 32, 32, 1)\n",
      "y_new (9, 3, 32, 32, 32)\n",
      "y_new shape in multiclassy_new shape in multiclass (9, 3, 32, 32, 32)\n",
      "reshaped y (9, 32, 32, 32, 3)\n",
      " (9, 3, 32, 32, 32)\n",
      "reshaped y (9, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "X_data.shapeReshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      " (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (10, 32, 32, 32, 4)\n",
      "y (10, 32, 32, 32, 1)\n",
      "y_new (10, 3, 32, 32, 32)\n",
      "x (10, 32, 32, 32, 4)y_new shape in multiclass (10, 3, 32, 32, 32)\n",
      "reshaped y (10, 32, 32, 32, 3)\n",
      "\n",
      "y (10, 32, 32, 32, 1)\n",
      "y_new (10, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (10, 3, 32, 32, 32)\n",
      "reshaped y (10, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (11, 32, 32, 32, 4)\n",
      "y (11, 32, 32, 32, 1)\n",
      "y_new (11, 3, 32, 32, 32)\n",
      "xy_new shape in multiclass (11, 3, 32, 32, 32)\n",
      "reshaped y (11, 32, 32, 32, 3)\n",
      " (11, 32, 32, 32, 4)\n",
      "y (11, 32, 32, 32, 1)\n",
      "y_new (11, 3, 32, 32, 32)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped datay_new shape in multiclass (11, 3, 32, 32, 32)\n",
      "reshaped y (11, 32, 32, 32, 3)\n",
      " (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (12, 32, 32, 32, 4)\n",
      "y (12, 32, 32, 32, 1)\n",
      "y_new (12, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (12, 3, 32, 32, 32)\n",
      "reshaped y (12, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (12, 32, 32, 32, 4)\n",
      "y (12, 32, 32, 32, 1)\n",
      "y_new (12, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (12, 3, 32, 32, 32)\n",
      "reshaped y (12, 32, 32, 32, 3)\n",
      "1/1 [==============================] - 6s 6s/step - loss: 0.5087 - acc: 0.7026 - val_loss: 0.0373 - val_acc: 0.9976\n",
      "Epoch 2/2\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (13, 32, 32, 32, 4)\n",
      "y (13, 32, 32, 32, 1)\n",
      "y_new (13, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (13, 3, 32, 32, 32)\n",
      "reshaped y (13, 32, 32, 32, 3)\n",
      "index 23\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (13, 32, 32, 32, 4)\n",
      "y (13, 32, 32, 32, 1)\n",
      "y_new (13, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (13, 3, 32, 32, 32)\n",
      "reshaped y (13, 32, 32, 32, 3)\n",
      "1/1 [==============================] - 9s 9s/step - loss: 0.0310 - acc: 0.9975 - val_loss: 0.0079 - val_acc: 0.9995\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<keras.callbacks.History at 0x7fcc7cdd8d68>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Run model\n",
    "\n",
    "model = unet_model_3d(input_shape=config[\"input_shape\"])\n",
    "\n",
    "model_file=config[\"model_file\"]\n",
    "model.fit_generator(generator=data_gen(data_file=config['data_file'],ids_file=config[\"training_file\"],labels=config[\"labels\"],batch_size=1),\n",
    "                        steps_per_epoch=1,\n",
    "                        epochs=2,\n",
    "                        validation_data=data_gen(data_file=config['data_file'],ids_file=config[\"validation_file\"],labels=config[\"labels\"],batch_size=1),\n",
    "                        validation_steps=1)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "index_list [40, 34, 8, 2, 45, 31, 37, 49, 23, 36, 58, 56, 11]\n",
      "index 37\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (1, 32, 32, 32, 4)\n",
      "y (1, 32, 32, 32, 1)\n",
      "y_new (1, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (1, 3, 32, 32, 32)\n",
      "reshaped y (1, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (2, 32, 32, 32, 4)\n",
      "y (2, 32, 32, 32, 1)\n",
      "y_new (2, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (2, 3, 32, 32, 32)\n",
      "reshaped y (2, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (3, 32, 32, 32, 4)\n",
      "y (3, 32, 32, 32, 1)\n",
      "y_new (3, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (3, 3, 32, 32, 32)\n",
      "reshaped y (3, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (4, 32, 32, 32, 4)\n",
      "y (4, 32, 32, 32, 1)\n",
      "y_new (4, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (4, 3, 32, 32, 32)\n",
      "reshaped y (4, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (5, 32, 32, 32, 4)\n",
      "y (5, 32, 32, 32, 1)\n",
      "y_new (5, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (5, 3, 32, 32, 32)\n",
      "reshaped y (5, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (6, 32, 32, 32, 4)\n",
      "y (6, 32, 32, 32, 1)\n",
      "y_new (6, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (6, 3, 32, 32, 32)\n",
      "reshaped y (6, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (7, 32, 32, 32, 4)\n",
      "y (7, 32, 32, 32, 1)\n",
      "y_new (7, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (7, 3, 32, 32, 32)\n",
      "reshaped y (7, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (8, 32, 32, 32, 4)\n",
      "y (8, 32, 32, 32, 1)\n",
      "y_new (8, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (8, 3, 32, 32, 32)\n",
      "reshaped y (8, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (9, 32, 32, 32, 4)\n",
      "y (9, 32, 32, 32, 1)\n",
      "y_new (9, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (9, 3, 32, 32, 32)\n",
      "reshaped y (9, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (10, 32, 32, 32, 4)\n",
      "y (10, 32, 32, 32, 1)\n",
      "y_new (10, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (10, 3, 32, 32, 32)\n",
      "reshaped y (10, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (11, 32, 32, 32, 4)\n",
      "y (11, 32, 32, 32, 1)\n",
      "y_new (11, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (11, 3, 32, 32, 32)\n",
      "reshaped y (11, 32, 32, 32, 3)\n",
      "X_data.shape (4, 32, 32, 32)\n",
      "Reshaped data (32, 32, 32, 4)\n",
      "Reshaped mask (32, 32, 32, 1)\n",
      "x (12, 32, 32, 32, 4)\n",
      "y (12, 32, 32, 32, 1)\n",
      "y_new (12, 3, 32, 32, 32)\n",
      "y_new shape in multiclass (12, 3, 32, 32, 32)\n",
      "reshaped y (12, 32, 32, 32, 3)\n"
     ]
    }
   ],
   "source": [
    "## Prediction\n",
    "\n",
    "prediction=model.predict_generator(generator=data_gen(data_file=config['data_file'],ids_file=config[\"validation_file\"],labels=config[\"labels\"]),steps=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "def multi_class_prediction(prediction, affine):\n",
    "    prediction_images = []\n",
    "    for i in range(prediction.shape[1]):\n",
    "        prediction_images.append(nib.Nifti1Image(prediction[0, i], affine))\n",
    "    return prediction_images"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Original\n",
    "def get_prediction_labels(prediction, threshold=0.5, labels=None):\n",
    "    n_samples = prediction.shape[0]\n",
    "    label_arrays = []\n",
    "    for sample_number in range(n_samples):\n",
    "        label_data = np.argmax(prediction[sample_number], axis=-1) + 1\n",
    "        label_data[np.max(prediction[sample_number], axis=-1) < threshold] = 0\n",
    "        if labels:\n",
    "            for value in np.unique(label_data).tolist()[1:]:\n",
    "                label_data[label_data == value] = labels[value - 1]\n",
    "                label_data == value #= labels[value ]#- 1]\n",
    "        label_arrays.append(np.array(label_data, dtype=np.uint8))\n",
    "    return label_arrays\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "def prediction_to_image(prediction, affine, label_map=False, threshold=0.5, labels=None):\n",
    "    if prediction.shape[1] == 1:\n",
    "        data = prediction[0, 0]\n",
    "        if label_map:\n",
    "            label_map_data = np.zeros(prediction[0, 0].shape, np.int8)\n",
    "            if labels:\n",
    "                label = labels[0]\n",
    "            else:\n",
    "                label = 1\n",
    "            label_map_data[data > threshold] = label\n",
    "            data = label_map_data\n",
    "    elif prediction.shape[1] > 1:\n",
    "        if label_map:\n",
    "            label_map_data = get_prediction_labels(prediction, threshold=threshold, labels=labels)\n",
    "            data = label_map_data[0]\n",
    "        else:\n",
    "            return multi_class_prediction(prediction, affine)\n",
    "    else:\n",
    "        raise RuntimeError(\"Invalid prediction array shape: {0}\".format(prediction.shape))\n",
    "    return nib.Nifti1Image(data, affine)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/anaconda/envs/unet/lib/python3.6/site-packages/keras/engine/saving.py:251: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use `array.size > 0` to check that an array is not empty.\n",
      "  if weight_names:\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "validation_list [40, 34, 8, 2, 45, 31, 37, 49, 23, 36, 58, 56, 11]\n",
      "index 40\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_40\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -184.390625]\n",
      " [   0.          5.5625      0.         26.28125 ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.5625  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -184.39062\n",
      "qoffset_y       : 26.28125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -184.39062]\n",
      "srow_y          : [ 0.       5.5625   0.      26.28125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 34\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_34\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.59375     1.796875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.53125 4.59375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.796875\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.59375  1.796875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 8\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_8\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -182.390625]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.53125 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.39062\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -182.39062]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 2\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_2\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.03125     0.          0.       -180.484375]\n",
      " [   0.          5.3125      0.         30.15625 ]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.03125 5.3125  4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -180.48438\n",
      "qoffset_y       : 30.15625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   4.03125    0.         0.      -180.48438]\n",
      "srow_y          : [ 0.       5.3125   0.      30.15625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 45\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_45\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125       0.          0.       -182.4375  ]\n",
      " [   0.          5.375       0.         24.1875  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.125   5.375   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 24.1875\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.      5.375   0.     24.1875]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 31\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_31\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   3.96875     0.          0.       -179.515625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      3.96875 5.28125 4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -179.51562\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   3.96875    0.         0.      -179.51562]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 37\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_37\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625     0.         0.      -190.21875]\n",
      " [   0.         5.5625     0.        24.28125]\n",
      " [   0.         0.         4.4375     1.71875]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.5625 5.5625 4.4375 1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.21875\n",
      "qoffset_y       : 24.28125\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.5625     0.         0.      -190.21875]\n",
      "srow_y          : [ 0.       5.5625   0.      24.28125]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 49\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_49\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -183.390625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.34375     2.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.28125 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.39062\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 2.671875\n",
      "srow_x          : [   4.21875    0.         0.      -183.39062]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.       0.       4.34375  2.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 36\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_36\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.96875     0.          0.       -195.015625]\n",
      " [   0.          5.1875      0.         30.09375 ]\n",
      " [   0.          0.          4.40625     5.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.96875 5.1875  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -195.01562\n",
      "qoffset_y       : 30.09375\n",
      "qoffset_z       : 5.703125\n",
      "srow_x          : [   4.96875    0.         0.      -195.01562]\n",
      "srow_y          : [ 0.       5.1875   0.      30.09375]\n",
      "srow_z          : [0.       0.       4.40625  5.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 58\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_58\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125      0.         0.      -182.4375 ]\n",
      " [   0.         5.4375     0.        28.21875]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.125  5.4375 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 28.21875\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.       5.4375   0.      28.21875]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 11\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_11\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.375     0.        0.     -187.3125]\n",
      " [   0.        5.625     0.       24.3125]\n",
      " [   0.        0.        4.5       1.75  ]\n",
      " [   0.        0.        0.        1.    ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.    4.375 5.625 4.5   1.    1.    1.    1.   ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.3125\n",
      "qoffset_y       : 24.3125\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.375     0.        0.     -187.3125]\n",
      "srow_y          : [ 0.      5.625   0.     24.3125]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 40\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_40\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -184.390625]\n",
      " [   0.          5.5625      0.         26.28125 ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.5625  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -184.39062\n",
      "qoffset_y       : 26.28125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -184.39062]\n",
      "srow_y          : [ 0.       5.5625   0.      26.28125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 34\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_34\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.59375     1.796875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.53125 4.59375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.796875\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.59375  1.796875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 8\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_8\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -182.390625]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.53125 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.39062\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -182.39062]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 2\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_2\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.03125     0.          0.       -180.484375]\n",
      " [   0.          5.3125      0.         30.15625 ]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.03125 5.3125  4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -180.48438\n",
      "qoffset_y       : 30.15625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   4.03125    0.         0.      -180.48438]\n",
      "srow_y          : [ 0.       5.3125   0.      30.15625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 45\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_45\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125       0.          0.       -182.4375  ]\n",
      " [   0.          5.375       0.         24.1875  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.125   5.375   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 24.1875\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.      5.375   0.     24.1875]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 31\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_31\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   3.96875     0.          0.       -179.515625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      3.96875 5.28125 4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -179.51562\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   3.96875    0.         0.      -179.51562]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 37\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_37\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625     0.         0.      -190.21875]\n",
      " [   0.         5.5625     0.        24.28125]\n",
      " [   0.         0.         4.4375     1.71875]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.5625 5.5625 4.4375 1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.21875\n",
      "qoffset_y       : 24.28125\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.5625     0.         0.      -190.21875]\n",
      "srow_y          : [ 0.       5.5625   0.      24.28125]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 49\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_49\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -183.390625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.34375     2.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.28125 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.39062\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 2.671875\n",
      "srow_x          : [   4.21875    0.         0.      -183.39062]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.       0.       4.34375  2.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 36\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_36\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.96875     0.          0.       -195.015625]\n",
      " [   0.          5.1875      0.         30.09375 ]\n",
      " [   0.          0.          4.40625     5.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.96875 5.1875  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -195.01562\n",
      "qoffset_y       : 30.09375\n",
      "qoffset_z       : 5.703125\n",
      "srow_x          : [   4.96875    0.         0.      -195.01562]\n",
      "srow_y          : [ 0.       5.1875   0.      30.09375]\n",
      "srow_z          : [0.       0.       4.40625  5.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 58\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_58\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125      0.         0.      -182.4375 ]\n",
      " [   0.         5.4375     0.        28.21875]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.125  5.4375 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 28.21875\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.       5.4375   0.      28.21875]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 11\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_11\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.375     0.        0.     -187.3125]\n",
      " [   0.        5.625     0.       24.3125]\n",
      " [   0.        0.        4.5       1.75  ]\n",
      " [   0.        0.        0.        1.    ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.    4.375 5.625 4.5   1.    1.    1.    1.   ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.3125\n",
      "qoffset_y       : 24.3125\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.375     0.        0.     -187.3125]\n",
      "srow_y          : [ 0.      5.625   0.     24.3125]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 40\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_40\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -184.390625]\n",
      " [   0.          5.5625      0.         26.28125 ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.5625  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -184.39062\n",
      "qoffset_y       : 26.28125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -184.39062]\n",
      "srow_y          : [ 0.       5.5625   0.      26.28125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 34\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_34\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.59375     1.796875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.53125 4.59375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.796875\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.59375  1.796875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 8\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_8\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -182.390625]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.53125 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.39062\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -182.39062]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 2\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_2\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.03125     0.          0.       -180.484375]\n",
      " [   0.          5.3125      0.         30.15625 ]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.03125 5.3125  4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -180.48438\n",
      "qoffset_y       : 30.15625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   4.03125    0.         0.      -180.48438]\n",
      "srow_y          : [ 0.       5.3125   0.      30.15625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 45\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_45\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125       0.          0.       -182.4375  ]\n",
      " [   0.          5.375       0.         24.1875  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.125   5.375   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 24.1875\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.      5.375   0.     24.1875]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 31\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_31\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   3.96875     0.          0.       -179.515625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      3.96875 5.28125 4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -179.51562\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   3.96875    0.         0.      -179.51562]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 37\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_37\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625     0.         0.      -190.21875]\n",
      " [   0.         5.5625     0.        24.28125]\n",
      " [   0.         0.         4.4375     1.71875]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.5625 5.5625 4.4375 1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.21875\n",
      "qoffset_y       : 24.28125\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.5625     0.         0.      -190.21875]\n",
      "srow_y          : [ 0.       5.5625   0.      24.28125]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 49\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_49\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -183.390625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.34375     2.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.28125 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.39062\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 2.671875\n",
      "srow_x          : [   4.21875    0.         0.      -183.39062]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.       0.       4.34375  2.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 36\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_36\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.96875     0.          0.       -195.015625]\n",
      " [   0.          5.1875      0.         30.09375 ]\n",
      " [   0.          0.          4.40625     5.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.96875 5.1875  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -195.01562\n",
      "qoffset_y       : 30.09375\n",
      "qoffset_z       : 5.703125\n",
      "srow_x          : [   4.96875    0.         0.      -195.01562]\n",
      "srow_y          : [ 0.       5.1875   0.      30.09375]\n",
      "srow_z          : [0.       0.       4.40625  5.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 58\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_58\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125      0.         0.      -182.4375 ]\n",
      " [   0.         5.4375     0.        28.21875]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.125  5.4375 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 28.21875\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.       5.4375   0.      28.21875]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 11\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_11\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.375     0.        0.     -187.3125]\n",
      " [   0.        5.625     0.       24.3125]\n",
      " [   0.        0.        4.5       1.75  ]\n",
      " [   0.        0.        0.        1.    ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.    4.375 5.625 4.5   1.    1.    1.    1.   ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.3125\n",
      "qoffset_y       : 24.3125\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.375     0.        0.     -187.3125]\n",
      "srow_y          : [ 0.      5.625   0.     24.3125]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 40\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_40\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -184.390625]\n",
      " [   0.          5.5625      0.         26.28125 ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.5625  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -184.39062\n",
      "qoffset_y       : 26.28125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -184.39062]\n",
      "srow_y          : [ 0.       5.5625   0.      26.28125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 34\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_34\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.59375     1.796875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.53125 4.59375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.796875\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.59375  1.796875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 8\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_8\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -182.390625]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.53125 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.39062\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -182.39062]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 2\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_2\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.03125     0.          0.       -180.484375]\n",
      " [   0.          5.3125      0.         30.15625 ]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.03125 5.3125  4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -180.48438\n",
      "qoffset_y       : 30.15625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   4.03125    0.         0.      -180.48438]\n",
      "srow_y          : [ 0.       5.3125   0.      30.15625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 45\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_45\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125       0.          0.       -182.4375  ]\n",
      " [   0.          5.375       0.         24.1875  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.125   5.375   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 24.1875\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.      5.375   0.     24.1875]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 31\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_31\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   3.96875     0.          0.       -179.515625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      3.96875 5.28125 4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -179.51562\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   3.96875    0.         0.      -179.51562]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 37\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_37\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625     0.         0.      -190.21875]\n",
      " [   0.         5.5625     0.        24.28125]\n",
      " [   0.         0.         4.4375     1.71875]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.5625 5.5625 4.4375 1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.21875\n",
      "qoffset_y       : 24.28125\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.5625     0.         0.      -190.21875]\n",
      "srow_y          : [ 0.       5.5625   0.      24.28125]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 49\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_49\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -183.390625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.34375     2.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.28125 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.39062\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 2.671875\n",
      "srow_x          : [   4.21875    0.         0.      -183.39062]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.       0.       4.34375  2.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 36\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_36\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.96875     0.          0.       -195.015625]\n",
      " [   0.          5.1875      0.         30.09375 ]\n",
      " [   0.          0.          4.40625     5.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.96875 5.1875  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -195.01562\n",
      "qoffset_y       : 30.09375\n",
      "qoffset_z       : 5.703125\n",
      "srow_x          : [   4.96875    0.         0.      -195.01562]\n",
      "srow_y          : [ 0.       5.1875   0.      30.09375]\n",
      "srow_z          : [0.       0.       4.40625  5.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 58\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_58\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125      0.         0.      -182.4375 ]\n",
      " [   0.         5.4375     0.        28.21875]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.125  5.4375 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 28.21875\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.       5.4375   0.      28.21875]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 11\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_11\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.375     0.        0.     -187.3125]\n",
      " [   0.        5.625     0.       24.3125]\n",
      " [   0.        0.        4.5       1.75  ]\n",
      " [   0.        0.        0.        1.    ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.    4.375 5.625 4.5   1.    1.    1.    1.   ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.3125\n",
      "qoffset_y       : 24.3125\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.375     0.        0.     -187.3125]\n",
      "srow_y          : [ 0.      5.625   0.     24.3125]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 40\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_40\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -184.390625]\n",
      " [   0.          5.5625      0.         26.28125 ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.5625  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -184.39062\n",
      "qoffset_y       : 26.28125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -184.39062]\n",
      "srow_y          : [ 0.       5.5625   0.      26.28125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 34\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_34\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.59375     1.796875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.53125 4.59375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.796875\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.59375  1.796875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 8\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_8\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -182.390625]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.53125 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.39062\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -182.39062]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 2\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_2\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.03125     0.          0.       -180.484375]\n",
      " [   0.          5.3125      0.         30.15625 ]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.03125 5.3125  4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -180.48438\n",
      "qoffset_y       : 30.15625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   4.03125    0.         0.      -180.48438]\n",
      "srow_y          : [ 0.       5.3125   0.      30.15625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 45\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_45\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125       0.          0.       -182.4375  ]\n",
      " [   0.          5.375       0.         24.1875  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.125   5.375   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 24.1875\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.      5.375   0.     24.1875]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 31\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_31\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   3.96875     0.          0.       -179.515625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      3.96875 5.28125 4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -179.51562\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   3.96875    0.         0.      -179.51562]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 37\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_37\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625     0.         0.      -190.21875]\n",
      " [   0.         5.5625     0.        24.28125]\n",
      " [   0.         0.         4.4375     1.71875]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.5625 5.5625 4.4375 1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.21875\n",
      "qoffset_y       : 24.28125\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.5625     0.         0.      -190.21875]\n",
      "srow_y          : [ 0.       5.5625   0.      24.28125]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 49\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_49\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -183.390625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.34375     2.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.28125 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.39062\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 2.671875\n",
      "srow_x          : [   4.21875    0.         0.      -183.39062]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.       0.       4.34375  2.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 36\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_36\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.96875     0.          0.       -195.015625]\n",
      " [   0.          5.1875      0.         30.09375 ]\n",
      " [   0.          0.          4.40625     5.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.96875 5.1875  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -195.01562\n",
      "qoffset_y       : 30.09375\n",
      "qoffset_z       : 5.703125\n",
      "srow_x          : [   4.96875    0.         0.      -195.01562]\n",
      "srow_y          : [ 0.       5.1875   0.      30.09375]\n",
      "srow_z          : [0.       0.       4.40625  5.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 58\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_58\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125      0.         0.      -182.4375 ]\n",
      " [   0.         5.4375     0.        28.21875]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.125  5.4375 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 28.21875\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.       5.4375   0.      28.21875]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 11\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_11\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.375     0.        0.     -187.3125]\n",
      " [   0.        5.625     0.       24.3125]\n",
      " [   0.        0.        4.5       1.75  ]\n",
      " [   0.        0.        0.        1.    ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.    4.375 5.625 4.5   1.    1.    1.    1.   ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.3125\n",
      "qoffset_y       : 24.3125\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.375     0.        0.     -187.3125]\n",
      "srow_y          : [ 0.      5.625   0.     24.3125]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 40\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_40\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -184.390625]\n",
      " [   0.          5.5625      0.         26.28125 ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.5625  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -184.39062\n",
      "qoffset_y       : 26.28125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -184.39062]\n",
      "srow_y          : [ 0.       5.5625   0.      26.28125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 34\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_34\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.59375     1.796875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.53125 4.59375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.796875\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.59375  1.796875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 8\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_8\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -182.390625]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.53125 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.39062\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -182.39062]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 2\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_2\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.03125     0.          0.       -180.484375]\n",
      " [   0.          5.3125      0.         30.15625 ]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.03125 5.3125  4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -180.48438\n",
      "qoffset_y       : 30.15625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   4.03125    0.         0.      -180.48438]\n",
      "srow_y          : [ 0.       5.3125   0.      30.15625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 45\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_45\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125       0.          0.       -182.4375  ]\n",
      " [   0.          5.375       0.         24.1875  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.125   5.375   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 24.1875\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.      5.375   0.     24.1875]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 31\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_31\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   3.96875     0.          0.       -179.515625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      3.96875 5.28125 4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -179.51562\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   3.96875    0.         0.      -179.51562]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 37\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_37\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625     0.         0.      -190.21875]\n",
      " [   0.         5.5625     0.        24.28125]\n",
      " [   0.         0.         4.4375     1.71875]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.5625 5.5625 4.4375 1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.21875\n",
      "qoffset_y       : 24.28125\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.5625     0.         0.      -190.21875]\n",
      "srow_y          : [ 0.       5.5625   0.      24.28125]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 49\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_49\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -183.390625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.34375     2.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.28125 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.39062\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 2.671875\n",
      "srow_x          : [   4.21875    0.         0.      -183.39062]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.       0.       4.34375  2.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 36\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_36\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.96875     0.          0.       -195.015625]\n",
      " [   0.          5.1875      0.         30.09375 ]\n",
      " [   0.          0.          4.40625     5.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.96875 5.1875  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -195.01562\n",
      "qoffset_y       : 30.09375\n",
      "qoffset_z       : 5.703125\n",
      "srow_x          : [   4.96875    0.         0.      -195.01562]\n",
      "srow_y          : [ 0.       5.1875   0.      30.09375]\n",
      "srow_z          : [0.       0.       4.40625  5.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 58\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_58\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125      0.         0.      -182.4375 ]\n",
      " [   0.         5.4375     0.        28.21875]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.125  5.4375 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 28.21875\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.       5.4375   0.      28.21875]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 11\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_11\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.375     0.        0.     -187.3125]\n",
      " [   0.        5.625     0.       24.3125]\n",
      " [   0.        0.        4.5       1.75  ]\n",
      " [   0.        0.        0.        1.    ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.    4.375 5.625 4.5   1.    1.    1.    1.   ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.3125\n",
      "qoffset_y       : 24.3125\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.375     0.        0.     -187.3125]\n",
      "srow_y          : [ 0.      5.625   0.     24.3125]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 40\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_40\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -184.390625]\n",
      " [   0.          5.5625      0.         26.28125 ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.5625  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -184.39062\n",
      "qoffset_y       : 26.28125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -184.39062]\n",
      "srow_y          : [ 0.       5.5625   0.      26.28125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 34\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_34\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.59375     1.796875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.53125 4.59375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.796875\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.59375  1.796875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 8\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_8\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -182.390625]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.53125 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.39062\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -182.39062]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 2\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_2\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.03125     0.          0.       -180.484375]\n",
      " [   0.          5.3125      0.         30.15625 ]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.03125 5.3125  4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -180.48438\n",
      "qoffset_y       : 30.15625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   4.03125    0.         0.      -180.48438]\n",
      "srow_y          : [ 0.       5.3125   0.      30.15625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 45\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_45\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125       0.          0.       -182.4375  ]\n",
      " [   0.          5.375       0.         24.1875  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.125   5.375   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 24.1875\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.      5.375   0.     24.1875]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 31\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_31\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   3.96875     0.          0.       -179.515625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      3.96875 5.28125 4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -179.51562\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   3.96875    0.         0.      -179.51562]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 37\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_37\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625     0.         0.      -190.21875]\n",
      " [   0.         5.5625     0.        24.28125]\n",
      " [   0.         0.         4.4375     1.71875]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.5625 5.5625 4.4375 1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.21875\n",
      "qoffset_y       : 24.28125\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.5625     0.         0.      -190.21875]\n",
      "srow_y          : [ 0.       5.5625   0.      24.28125]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 49\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_49\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -183.390625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.34375     2.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.28125 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.39062\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 2.671875\n",
      "srow_x          : [   4.21875    0.         0.      -183.39062]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.       0.       4.34375  2.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 36\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_36\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.96875     0.          0.       -195.015625]\n",
      " [   0.          5.1875      0.         30.09375 ]\n",
      " [   0.          0.          4.40625     5.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.96875 5.1875  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -195.01562\n",
      "qoffset_y       : 30.09375\n",
      "qoffset_z       : 5.703125\n",
      "srow_x          : [   4.96875    0.         0.      -195.01562]\n",
      "srow_y          : [ 0.       5.1875   0.      30.09375]\n",
      "srow_z          : [0.       0.       4.40625  5.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 58\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_58\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125      0.         0.      -182.4375 ]\n",
      " [   0.         5.4375     0.        28.21875]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.125  5.4375 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 28.21875\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.       5.4375   0.      28.21875]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 11\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_11\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.375     0.        0.     -187.3125]\n",
      " [   0.        5.625     0.       24.3125]\n",
      " [   0.        0.        4.5       1.75  ]\n",
      " [   0.        0.        0.        1.    ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.    4.375 5.625 4.5   1.    1.    1.    1.   ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.3125\n",
      "qoffset_y       : 24.3125\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.375     0.        0.     -187.3125]\n",
      "srow_y          : [ 0.      5.625   0.     24.3125]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 40\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_40\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -184.390625]\n",
      " [   0.          5.5625      0.         26.28125 ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.5625  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -184.39062\n",
      "qoffset_y       : 26.28125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -184.39062]\n",
      "srow_y          : [ 0.       5.5625   0.      26.28125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 34\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_34\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.59375     1.796875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.53125 4.59375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.796875\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.59375  1.796875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 8\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_8\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -182.390625]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.53125 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.39062\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -182.39062]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 2\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_2\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.03125     0.          0.       -180.484375]\n",
      " [   0.          5.3125      0.         30.15625 ]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.03125 5.3125  4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -180.48438\n",
      "qoffset_y       : 30.15625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   4.03125    0.         0.      -180.48438]\n",
      "srow_y          : [ 0.       5.3125   0.      30.15625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 45\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_45\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125       0.          0.       -182.4375  ]\n",
      " [   0.          5.375       0.         24.1875  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.125   5.375   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 24.1875\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.      5.375   0.     24.1875]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 31\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_31\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   3.96875     0.          0.       -179.515625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      3.96875 5.28125 4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -179.51562\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   3.96875    0.         0.      -179.51562]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 37\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_37\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625     0.         0.      -190.21875]\n",
      " [   0.         5.5625     0.        24.28125]\n",
      " [   0.         0.         4.4375     1.71875]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.5625 5.5625 4.4375 1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.21875\n",
      "qoffset_y       : 24.28125\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.5625     0.         0.      -190.21875]\n",
      "srow_y          : [ 0.       5.5625   0.      24.28125]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 49\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_49\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -183.390625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.34375     2.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.28125 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.39062\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 2.671875\n",
      "srow_x          : [   4.21875    0.         0.      -183.39062]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.       0.       4.34375  2.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 36\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_36\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.96875     0.          0.       -195.015625]\n",
      " [   0.          5.1875      0.         30.09375 ]\n",
      " [   0.          0.          4.40625     5.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.96875 5.1875  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -195.01562\n",
      "qoffset_y       : 30.09375\n",
      "qoffset_z       : 5.703125\n",
      "srow_x          : [   4.96875    0.         0.      -195.01562]\n",
      "srow_y          : [ 0.       5.1875   0.      30.09375]\n",
      "srow_z          : [0.       0.       4.40625  5.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 58\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_58\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125      0.         0.      -182.4375 ]\n",
      " [   0.         5.4375     0.        28.21875]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.125  5.4375 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 28.21875\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.       5.4375   0.      28.21875]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 11\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_11\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.375     0.        0.     -187.3125]\n",
      " [   0.        5.625     0.       24.3125]\n",
      " [   0.        0.        4.5       1.75  ]\n",
      " [   0.        0.        0.        1.    ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.    4.375 5.625 4.5   1.    1.    1.    1.   ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.3125\n",
      "qoffset_y       : 24.3125\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.375     0.        0.     -187.3125]\n",
      "srow_y          : [ 0.      5.625   0.     24.3125]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 40\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_40\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -184.390625]\n",
      " [   0.          5.5625      0.         26.28125 ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.5625  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -184.39062\n",
      "qoffset_y       : 26.28125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -184.39062]\n",
      "srow_y          : [ 0.       5.5625   0.      26.28125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 34\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_34\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.59375     1.796875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.53125 4.59375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.796875\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.59375  1.796875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 8\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_8\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -182.390625]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.53125 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.39062\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -182.39062]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 2\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_2\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.03125     0.          0.       -180.484375]\n",
      " [   0.          5.3125      0.         30.15625 ]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.03125 5.3125  4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -180.48438\n",
      "qoffset_y       : 30.15625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   4.03125    0.         0.      -180.48438]\n",
      "srow_y          : [ 0.       5.3125   0.      30.15625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 45\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_45\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125       0.          0.       -182.4375  ]\n",
      " [   0.          5.375       0.         24.1875  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.125   5.375   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 24.1875\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.      5.375   0.     24.1875]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 31\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_31\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   3.96875     0.          0.       -179.515625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      3.96875 5.28125 4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -179.51562\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   3.96875    0.         0.      -179.51562]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 37\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_37\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625     0.         0.      -190.21875]\n",
      " [   0.         5.5625     0.        24.28125]\n",
      " [   0.         0.         4.4375     1.71875]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.5625 5.5625 4.4375 1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.21875\n",
      "qoffset_y       : 24.28125\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.5625     0.         0.      -190.21875]\n",
      "srow_y          : [ 0.       5.5625   0.      24.28125]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 49\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_49\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -183.390625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.34375     2.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.28125 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.39062\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 2.671875\n",
      "srow_x          : [   4.21875    0.         0.      -183.39062]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.       0.       4.34375  2.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 36\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_36\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.96875     0.          0.       -195.015625]\n",
      " [   0.          5.1875      0.         30.09375 ]\n",
      " [   0.          0.          4.40625     5.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.96875 5.1875  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -195.01562\n",
      "qoffset_y       : 30.09375\n",
      "qoffset_z       : 5.703125\n",
      "srow_x          : [   4.96875    0.         0.      -195.01562]\n",
      "srow_y          : [ 0.       5.1875   0.      30.09375]\n",
      "srow_z          : [0.       0.       4.40625  5.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 58\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_58\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125      0.         0.      -182.4375 ]\n",
      " [   0.         5.4375     0.        28.21875]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.125  5.4375 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 28.21875\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.       5.4375   0.      28.21875]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 11\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_11\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.375     0.        0.     -187.3125]\n",
      " [   0.        5.625     0.       24.3125]\n",
      " [   0.        0.        4.5       1.75  ]\n",
      " [   0.        0.        0.        1.    ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.    4.375 5.625 4.5   1.    1.    1.    1.   ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.3125\n",
      "qoffset_y       : 24.3125\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.375     0.        0.     -187.3125]\n",
      "srow_y          : [ 0.      5.625   0.     24.3125]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 40\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_40\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -184.390625]\n",
      " [   0.          5.5625      0.         26.28125 ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.5625  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -184.39062\n",
      "qoffset_y       : 26.28125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -184.39062]\n",
      "srow_y          : [ 0.       5.5625   0.      26.28125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 34\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_34\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.59375     1.796875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.53125 4.59375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.796875\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.59375  1.796875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 8\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_8\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -182.390625]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.53125 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.39062\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -182.39062]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "index 2\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_2\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.03125     0.          0.       -180.484375]\n",
      " [   0.          5.3125      0.         30.15625 ]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.03125 5.3125  4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -180.48438\n",
      "qoffset_y       : 30.15625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   4.03125    0.         0.      -180.48438]\n",
      "srow_y          : [ 0.       5.3125   0.      30.15625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 45\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_45\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125       0.          0.       -182.4375  ]\n",
      " [   0.          5.375       0.         24.1875  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.125   5.375   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 24.1875\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.      5.375   0.     24.1875]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 31\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_31\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   3.96875     0.          0.       -179.515625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      3.96875 5.28125 4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -179.51562\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   3.96875    0.         0.      -179.51562]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 37\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_37\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625     0.         0.      -190.21875]\n",
      " [   0.         5.5625     0.        24.28125]\n",
      " [   0.         0.         4.4375     1.71875]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.5625 5.5625 4.4375 1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.21875\n",
      "qoffset_y       : 24.28125\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.5625     0.         0.      -190.21875]\n",
      "srow_y          : [ 0.       5.5625   0.      24.28125]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 49\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_49\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -183.390625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.34375     2.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.28125 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.39062\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 2.671875\n",
      "srow_x          : [   4.21875    0.         0.      -183.39062]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.       0.       4.34375  2.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 36\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_36\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.96875     0.          0.       -195.015625]\n",
      " [   0.          5.1875      0.         30.09375 ]\n",
      " [   0.          0.          4.40625     5.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.96875 5.1875  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -195.01562\n",
      "qoffset_y       : 30.09375\n",
      "qoffset_z       : 5.703125\n",
      "srow_x          : [   4.96875    0.         0.      -195.01562]\n",
      "srow_y          : [ 0.       5.1875   0.      30.09375]\n",
      "srow_z          : [0.       0.       4.40625  5.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 58\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_58\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125      0.         0.      -182.4375 ]\n",
      " [   0.         5.4375     0.        28.21875]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.125  5.4375 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 28.21875\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.       5.4375   0.      28.21875]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 11\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_11\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.375     0.        0.     -187.3125]\n",
      " [   0.        5.625     0.       24.3125]\n",
      " [   0.        0.        4.5       1.75  ]\n",
      " [   0.        0.        0.        1.    ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.    4.375 5.625 4.5   1.    1.    1.    1.   ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.3125\n",
      "qoffset_y       : 24.3125\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.375     0.        0.     -187.3125]\n",
      "srow_y          : [ 0.      5.625   0.     24.3125]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 40\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_40\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -184.390625]\n",
      " [   0.          5.5625      0.         26.28125 ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.5625  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -184.39062\n",
      "qoffset_y       : 26.28125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -184.39062]\n",
      "srow_y          : [ 0.       5.5625   0.      26.28125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 34\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_34\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.59375     1.796875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.53125 4.59375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.796875\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.59375  1.796875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 8\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_8\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -182.390625]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.53125 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.39062\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -182.39062]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 2\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_2\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.03125     0.          0.       -180.484375]\n",
      " [   0.          5.3125      0.         30.15625 ]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.03125 5.3125  4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -180.48438\n",
      "qoffset_y       : 30.15625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   4.03125    0.         0.      -180.48438]\n",
      "srow_y          : [ 0.       5.3125   0.      30.15625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 45\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_45\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125       0.          0.       -182.4375  ]\n",
      " [   0.          5.375       0.         24.1875  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.125   5.375   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 24.1875\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.      5.375   0.     24.1875]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 31\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_31\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   3.96875     0.          0.       -179.515625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      3.96875 5.28125 4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -179.51562\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   3.96875    0.         0.      -179.51562]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 37\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_37\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625     0.         0.      -190.21875]\n",
      " [   0.         5.5625     0.        24.28125]\n",
      " [   0.         0.         4.4375     1.71875]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.5625 5.5625 4.4375 1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.21875\n",
      "qoffset_y       : 24.28125\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.5625     0.         0.      -190.21875]\n",
      "srow_y          : [ 0.       5.5625   0.      24.28125]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 49\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_49\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -183.390625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.34375     2.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.28125 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.39062\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 2.671875\n",
      "srow_x          : [   4.21875    0.         0.      -183.39062]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.       0.       4.34375  2.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 36\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_36\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.96875     0.          0.       -195.015625]\n",
      " [   0.          5.1875      0.         30.09375 ]\n",
      " [   0.          0.          4.40625     5.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.96875 5.1875  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -195.01562\n",
      "qoffset_y       : 30.09375\n",
      "qoffset_z       : 5.703125\n",
      "srow_x          : [   4.96875    0.         0.      -195.01562]\n",
      "srow_y          : [ 0.       5.1875   0.      30.09375]\n",
      "srow_z          : [0.       0.       4.40625  5.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 58\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_58\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125      0.         0.      -182.4375 ]\n",
      " [   0.         5.4375     0.        28.21875]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.125  5.4375 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 28.21875\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.       5.4375   0.      28.21875]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 11\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_11\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.375     0.        0.     -187.3125]\n",
      " [   0.        5.625     0.       24.3125]\n",
      " [   0.        0.        4.5       1.75  ]\n",
      " [   0.        0.        0.        1.    ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.    4.375 5.625 4.5   1.    1.    1.    1.   ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.3125\n",
      "qoffset_y       : 24.3125\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.375     0.        0.     -187.3125]\n",
      "srow_y          : [ 0.      5.625   0.     24.3125]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 40\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_40\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -184.390625]\n",
      " [   0.          5.5625      0.         26.28125 ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.5625  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -184.39062\n",
      "qoffset_y       : 26.28125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -184.39062]\n",
      "srow_y          : [ 0.       5.5625   0.      26.28125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 34\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_34\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.59375     1.796875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.53125 4.59375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.796875\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.59375  1.796875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "index 8\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_8\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -182.390625]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.53125 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.39062\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -182.39062]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 2\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_2\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.03125     0.          0.       -180.484375]\n",
      " [   0.          5.3125      0.         30.15625 ]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.03125 5.3125  4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -180.48438\n",
      "qoffset_y       : 30.15625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   4.03125    0.         0.      -180.48438]\n",
      "srow_y          : [ 0.       5.3125   0.      30.15625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 45\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_45\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125       0.          0.       -182.4375  ]\n",
      " [   0.          5.375       0.         24.1875  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.125   5.375   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 24.1875\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.      5.375   0.     24.1875]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 31\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_31\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   3.96875     0.          0.       -179.515625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      3.96875 5.28125 4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -179.51562\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   3.96875    0.         0.      -179.51562]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 37\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_37\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625     0.         0.      -190.21875]\n",
      " [   0.         5.5625     0.        24.28125]\n",
      " [   0.         0.         4.4375     1.71875]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.5625 5.5625 4.4375 1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.21875\n",
      "qoffset_y       : 24.28125\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.5625     0.         0.      -190.21875]\n",
      "srow_y          : [ 0.       5.5625   0.      24.28125]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 49\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_49\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -183.390625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.34375     2.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.28125 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.39062\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 2.671875\n",
      "srow_x          : [   4.21875    0.         0.      -183.39062]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.       0.       4.34375  2.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 36\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_36\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.96875     0.          0.       -195.015625]\n",
      " [   0.          5.1875      0.         30.09375 ]\n",
      " [   0.          0.          4.40625     5.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.96875 5.1875  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -195.01562\n",
      "qoffset_y       : 30.09375\n",
      "qoffset_z       : 5.703125\n",
      "srow_x          : [   4.96875    0.         0.      -195.01562]\n",
      "srow_y          : [ 0.       5.1875   0.      30.09375]\n",
      "srow_z          : [0.       0.       4.40625  5.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 58\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_58\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125      0.         0.      -182.4375 ]\n",
      " [   0.         5.4375     0.        28.21875]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.125  5.4375 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 28.21875\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.       5.4375   0.      28.21875]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 11\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_11\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.375     0.        0.     -187.3125]\n",
      " [   0.        5.625     0.       24.3125]\n",
      " [   0.        0.        4.5       1.75  ]\n",
      " [   0.        0.        0.        1.    ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.    4.375 5.625 4.5   1.    1.    1.    1.   ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.3125\n",
      "qoffset_y       : 24.3125\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.375     0.        0.     -187.3125]\n",
      "srow_y          : [ 0.      5.625   0.     24.3125]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 40\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_40\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -184.390625]\n",
      " [   0.          5.5625      0.         26.28125 ]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.5625  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -184.39062\n",
      "qoffset_y       : 26.28125\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -184.39062]\n",
      "srow_y          : [ 0.       5.5625   0.      26.28125]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 34\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_34\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.625       0.          0.       -190.1875  ]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.59375     1.796875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.625   5.53125 4.59375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.1875\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.796875\n",
      "srow_x          : [   4.625     0.        0.     -190.1875]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.59375  1.796875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 8\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_8\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -182.390625]\n",
      " [   0.          5.53125     0.         24.265625]\n",
      " [   0.          0.          4.40625     1.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.53125 4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.39062\n",
      "qoffset_y       : 24.265625\n",
      "qoffset_z       : 1.703125\n",
      "srow_x          : [   4.21875    0.         0.      -182.39062]\n",
      "srow_y          : [ 0.        5.53125   0.       24.265625]\n",
      "srow_z          : [0.       0.       4.40625  1.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 2\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_2\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.03125     0.          0.       -180.484375]\n",
      " [   0.          5.3125      0.         30.15625 ]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.03125 5.3125  4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -180.48438\n",
      "qoffset_y       : 30.15625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   4.03125    0.         0.      -180.48438]\n",
      "srow_y          : [ 0.       5.3125   0.      30.15625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 45\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_45\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125       0.          0.       -182.4375  ]\n",
      " [   0.          5.375       0.         24.1875  ]\n",
      " [   0.          0.          4.53125     1.765625]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.125   5.375   4.53125 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 24.1875\n",
      "qoffset_z       : 1.765625\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.      5.375   0.     24.1875]\n",
      "srow_z          : [0.       0.       4.53125  1.765625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 31\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_31\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   3.96875     0.          0.       -179.515625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.625       1.8125  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      3.96875 5.28125 4.625   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -179.51562\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 1.8125\n",
      "srow_x          : [   3.96875    0.         0.      -179.51562]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.     0.     4.625  1.8125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 37\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_37\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.5625     0.         0.      -190.21875]\n",
      " [   0.         5.5625     0.        24.28125]\n",
      " [   0.         0.         4.4375     1.71875]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.5625 5.5625 4.4375 1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -190.21875\n",
      "qoffset_y       : 24.28125\n",
      "qoffset_z       : 1.71875\n",
      "srow_x          : [   4.5625     0.         0.      -190.21875]\n",
      "srow_y          : [ 0.       5.5625   0.      24.28125]\n",
      "srow_z          : [0.      0.      4.4375  1.71875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 49\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_49\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.21875     0.          0.       -183.390625]\n",
      " [   0.          5.28125     0.         27.140625]\n",
      " [   0.          0.          4.34375     2.671875]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.21875 5.28125 4.34375 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.39062\n",
      "qoffset_y       : 27.140625\n",
      "qoffset_z       : 2.671875\n",
      "srow_x          : [   4.21875    0.         0.      -183.39062]\n",
      "srow_y          : [ 0.        5.28125   0.       27.140625]\n",
      "srow_z          : [0.       0.       4.34375  2.671875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 23\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_23\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.09375     0.          0.       -183.453125]\n",
      " [   0.          4.9375      0.         30.96875 ]\n",
      " [   0.          0.          4.125      10.5625  ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.09375 4.9375  4.125   1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -183.45312\n",
      "qoffset_y       : 30.96875\n",
      "qoffset_z       : 10.5625\n",
      "srow_x          : [   4.09375    0.         0.      -183.45312]\n",
      "srow_y          : [ 0.       4.9375   0.      30.96875]\n",
      "srow_z          : [ 0.      0.      4.125  10.5625]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 36\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_36\n",
      "test_data shape (1, 4, 32, 32, 32)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.96875     0.          0.       -195.015625]\n",
      " [   0.          5.1875      0.         30.09375 ]\n",
      " [   0.          0.          4.40625     5.703125]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.96875 5.1875  4.40625 1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -195.01562\n",
      "qoffset_y       : 30.09375\n",
      "qoffset_z       : 5.703125\n",
      "srow_x          : [   4.96875    0.         0.      -195.01562]\n",
      "srow_y          : [ 0.       5.1875   0.      30.09375]\n",
      "srow_z          : [0.       0.       4.40625  5.703125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 58\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_58\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.125      0.         0.      -182.4375 ]\n",
      " [   0.         5.4375     0.        28.21875]\n",
      " [   0.         0.         4.375      1.6875 ]\n",
      " [   0.         0.         0.         1.     ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.     4.125  5.4375 4.375  1.     1.     1.     1.    ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -182.4375\n",
      "qoffset_y       : 28.21875\n",
      "qoffset_z       : 1.6875\n",
      "srow_x          : [   4.125     0.        0.     -182.4375]\n",
      "srow_y          : [ 0.       5.4375   0.      28.21875]\n",
      "srow_z          : [0.     0.     4.375  1.6875]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 56\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_56\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.4375      0.          0.       -186.28125 ]\n",
      " [   0.          5.59375     0.         24.296875]\n",
      " [   0.          0.          4.5625      1.78125 ]\n",
      " [   0.          0.          0.          1.      ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.      4.4375  5.59375 4.5625  1.      1.      1.      1.     ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -186.28125\n",
      "qoffset_y       : 24.296875\n",
      "qoffset_z       : 1.78125\n",
      "srow_x          : [   4.4375     0.         0.      -186.28125]\n",
      "srow_y          : [ 0.        5.59375   0.       24.296875]\n",
      "srow_z          : [0.      0.      4.5625  1.78125]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n",
      "index 11\n",
      "/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_11\n",
      "test_data shape (1, 4, 32, 32, 32)\n",
      "labels (1, 2, 4)\n",
      "prediction_image <class 'nibabel.nifti1.Nifti1Image'>\n",
      "data shape (32, 32, 32)\n",
      "affine: \n",
      "[[   4.375     0.        0.     -187.3125]\n",
      " [   0.        5.625     0.       24.3125]\n",
      " [   0.        0.        4.5       1.75  ]\n",
      " [   0.        0.        0.        1.    ]]\n",
      "metadata:\n",
      "<class 'nibabel.nifti1.Nifti1Header'> object, endian='<'\n",
      "sizeof_hdr      : 348\n",
      "data_type       : b''\n",
      "db_name         : b''\n",
      "extents         : 0\n",
      "session_error   : 0\n",
      "regular         : b''\n",
      "dim_info        : 0\n",
      "dim             : [ 3 32 32 32  1  1  1  1]\n",
      "intent_p1       : 0.0\n",
      "intent_p2       : 0.0\n",
      "intent_p3       : 0.0\n",
      "intent_code     : none\n",
      "datatype        : uint8\n",
      "bitpix          : 8\n",
      "slice_start     : 0\n",
      "pixdim          : [1.    4.375 5.625 4.5   1.    1.    1.    1.   ]\n",
      "vox_offset      : 0.0\n",
      "scl_slope       : nan\n",
      "scl_inter       : nan\n",
      "slice_end       : 0\n",
      "slice_code      : unknown\n",
      "xyzt_units      : 0\n",
      "cal_max         : 0.0\n",
      "cal_min         : 0.0\n",
      "slice_duration  : 0.0\n",
      "toffset         : 0.0\n",
      "glmax           : 0\n",
      "glmin           : 0\n",
      "descrip         : b''\n",
      "aux_file        : b''\n",
      "qform_code      : unknown\n",
      "sform_code      : aligned\n",
      "quatern_b       : 0.0\n",
      "quatern_c       : 0.0\n",
      "quatern_d       : 0.0\n",
      "qoffset_x       : -187.3125\n",
      "qoffset_y       : 24.3125\n",
      "qoffset_z       : 1.75\n",
      "srow_x          : [   4.375     0.        0.     -187.3125]\n",
      "srow_y          : [ 0.      5.625   0.     24.3125]\n",
      "srow_z          : [0.   0.   4.5  1.75]\n",
      "intent_name     : b''\n",
      "magic           : b'n+1'\n"
     ]
    }
   ],
   "source": [
    "## Make predictions - create prediction folder\n",
    "\n",
    "from keras.models import load_model\n",
    "from keras.utils.io_utils import H5Dict\n",
    "import nibabel as nib\n",
    "import image_slicer\n",
    "\n",
    "prediction_dir = os.path.join('/home/vjain/notebooks/3DUnetCNN/brats/',\"prediction\")\n",
    "os.makedirs(prediction_dir)\n",
    "output_dir=prediction_dir\n",
    "\n",
    "with (open(\"/home/vjain/notebooks/3DUnetCNN/brats/validation_ids.pkl\", \"rb\")) as validation_keys_file,open('/home/vjain/notebooks/3DUnetCNN/brats/brats_data.h5','rb') as brats_file, open('/home/vjain/notebooks/3DUnetCNN/brats/tumor_model.h5','rb') as model_file:\n",
    "    f = h5py.File(model_file, 'r')\n",
    "    model = load_model(f, custom_objects = None, compile=True)\n",
    "    validation_file=pickle.load(validation_keys_file)\n",
    "    orig_index_list = validation_file\n",
    "    x_list = list()\n",
    "    y_list = list()\n",
    "    validation_indices= list(copy.copy(orig_index_list))\n",
    "    print('validation_list',validation_indices)\n",
    "    \n",
    "    while len(validation_file) > 0:\n",
    "        index = validation_file.pop()\n",
    "        for index in validation_indices:\n",
    "            print('index',index)\n",
    "            case_directory = os.path.join(output_dir, \"validation_case_{}\".format(index))\n",
    "            print(case_directory)\n",
    "            # Test case for validation data\n",
    "            if not os.path.exists(case_directory):\n",
    "                os.makedirs(case_directory)\n",
    "            # Orientation of validation data\n",
    "            affine_file = HDF5Matrix(brats_file, 'affine',0,None)   \n",
    "            affine = affine_file[index]\n",
    "            # Datafile for deriving test data\n",
    "            data_file = HDF5Matrix(brats_file, 'data',0,None)   \n",
    "            test_data = np.asarray([data_file[index]])\n",
    "            print('test_data shape',test_data.shape)\n",
    "            # Modalities\n",
    "            training_modalities=config['training_modalities']\n",
    "            for i, modality in enumerate(training_modalities):\n",
    "                image = nib.Nifti1Image(test_data[0, i], affine)\n",
    "                image.to_filename(os.path.join(case_directory, \"data_{0}.nii.gz\".format(modality)))\n",
    "            # Segmentation map\n",
    "            truth_file = HDF5Matrix(brats_file, 'truth',0,None)\n",
    "            test_truth = nib.Nifti1Image(truth_file[index][0], affine)\n",
    "            test_truth.to_filename(os.path.join(case_directory, \"truth.nii.gz\"))\n",
    "            #test_data=np.reshape(test_data,(test_data.shape[2],test_data.shape[3],test_data.shape[4],test_data.shape[1],test_data.shape[0]))\n",
    "            labels=config[\"labels\"]\n",
    "            print('labels',labels)\n",
    "            # Prediction image for each validation case\n",
    "            prediction_image = prediction_to_image(prediction, affine, label_map=True, threshold=0.1,\n",
    "                                           labels=labels)\n",
    "            print('prediction_image',prediction_image)\n",
    "            prediction_image.to_filename(os.path.join(case_directory, \"prediction.nii.gz\"))\n",
    "            \n",
    "            #sliced=image_slicer.slice(prediction_image, 6)\n",
    "            #for image in sliced:\n",
    "            #    image.to_filename(os.path.join(case_directory, \"prediction.nii.gz\"))\n",
    "            \n",
    "            #for image in prediction_image:\n",
    "            #    image.to_filename(os.path.join(case_directory, \"prediction.nii.gz\"))\n",
    "            "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/anaconda/envs/unet/lib/python3.6/site-packages/scipy/ndimage/measurements.py:272: DeprecationWarning:\n",
      "\n",
      "In future, it will be an error for 'np.bool_' scalars to be interpreted as an index\n",
      "\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "<nilearn.plotting.displays.OrthoSlicer at 0x7fcc435c2d68>"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAj0AAADeCAYAAADW3rEEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAFThJREFUeJzt3XlsVNX7x/FPKRYHWy21AgIGoqwutVARQxDHLyBtJWLECIhAtRYRglajuGECUQQxmkJwiRoDsmM1LArzEySNBqNGhQhI3UijRRBRKy1YaWf6+wM7Uulyp73LzJz3K7lR5869c8Y503nuOc99TkJdXV2dAAAA4lw7rxsAAADgBoIeAABgBIIeAABgBIIeAABgBIIeAABgBIIeAABgBIIeAABgBIIeAABgBIIeAABgBIIeAABgBIIeAABgBIIeAABgBIIeAABgBIIeAABgBIIeAABgBIIeAABgBIIeAABgu2AwqIEDB2rMmDFeNyWsvdcNgMumJlh73vI6Z9sBAIhrixcv1oABA3Ts2DGvmxLGSA8AALBVeXm53nvvPd19991eN6UBRnoAAICtCgsLtWjRIlVWVlp6fnZ2to4ePdrk/vT0dAUCgTa3i6AHAADY5t1331Xnzp2VlZWlkpISS8ccPXpUn3/+eZP7r7rqKlvaRtADAABss3PnTm3atElbtmxRdXW1jh07pjvuuEMrV65s5qg6SdWOt42cHgAAYJsFCxaovLxcZWVlWrt2rf73v/+1EPBIUkingp6mNnsw0gMAADxWH/Q4i6AHAAA4wu/3y+/3e92MMIKeKFFYWChJKioq8rglwJnonwCc5U5OD0FPlNi9e7fXTQCaRP+EUwiocUpI0t+OvwpBjxcaq4pc2sw+L1C52X7R8tm2RmnLTwFag4Aap3D3lmW9evXS9u3bvW4GWqlXr17y+XxKTk5W165dlZeXp6qqKq+bBQCIM3ER9CD2bd68WVVVVdq9e7d27dqlBQsWeN0kICZw0RfbuOirxy3rMFDXrl01evRohrwB03k5HezytP3mzZs1cuRIHT58WKNHj9aCBQs0f/58V9vgPXduWWekB1GlvLxcW7duVe/evb1uCgC4yuyLvvqcHmdHegh6EBVuvvlmpaSk6KKLLlLnzp01b948r5sEAK7ios95BD2IChs2bFBlZaVKSkpUWlra7Gq7ABBPuOiT3MrpIehBVLnuuuuUl5enhx56yOumAIAruOiTmN6KUE1Njaqrq8NbbW2t101CKxUWFmrbtm2GzmsDMJXZF32M9EQkNzdXPp8vvM2dO9frJqGVLrjgAk2ZMkVPPfWU100BYgIXffGDiz5nxcUt62VlZV434RSbb7Hc8qatp3NE7vK2n6Oxz+/ll19u+4kNFGmfyZ0S4QtEW1VpKoJLOnXRd7onnnhCTz/9tEetQVucftH39ttve90cF7EMBQCgBVFz0YdW4aKvHguOAgAAI1CcEAAAwDaM9AAAAI8xvQUAcIrVpHSPksW9vJEjVzYn7JNwb4E701sEPQAAwGPk9AAAANiGkR4AAOAxcnoAAIARyOmJHi5UWv69kX2RVMu1mvRn9ZxWz7clwdr/G8vvJZYS/qKtOrEir7Bs9XP+veWnAEAb1MmNiszk9AAAACMw0gMAADzG9BYAADACQQ8AADACd28BAAAjUJwQAADANoz0AICBLK9t9aazpRnC5Toslr9wg90lQKJ9nbPo0NL0lj39g6AHAAB4rKXpLZ8tr0LQAwAAPEbQ4zwXKi1H0/mcOqetr2txKD23zuRh4KY5/fk6ff5IK0oDQCTMDnoAAICtqqurNXz4cP3999+qra3Vrbfeqnnz5rVwlDvLUBD0AAAA23To0EE7duxQcnKyampqNGzYMOXk5Oiaa65p5iiKEwIAgBiTkJCg5ORkSVJNTY1qamqU0OLdee4UJ6RODwAAsFUwGFRmZqY6d+6sUaNGaciQIV43SRJBDwAAsFliYqJ2796t8vJyffbZZ9q7d28LR9RPbzW12YOgBwAAOCI1NVV+v1+BQKDlJweDTW82IegBAAC2+fXXX1VRUSFJ+uuvv7R9+3b179+/+YNCkk42s9mERGYAAGCbQ4cOaerUqQoGgwqFQrrttts0ZswYr5sliaAHAADYKCMjQ7t27YrsoDpJNY40pwGCHgCII9G0cGe8s7tCea7VRTXjcWFSgp42sLi8hFdLMsAGTqxabPOyJIhcxN/JVqwAzhImQBRyKeghkRkAABghPkd6AABA7KiTrXdpNYWgBwAAeIucHgAAYARyegAAAOzDSA8AAPAW01sAAMAIJDIDAAAjkNMDAABgH0Z6AACAt8jpAQDAHFaXYcld7mw7PEHQAwAAjOBSIjM5PQAAwAiM9AAAAG8xvQUAAIxA0AMAAIxAnR4AAAD7MNIDAAC8FRLLUAAAAAOQ09OIqQmWnma5wFNdXRsa03pbEqy9D9jAYp9xxXLn+1ukRcuM7IuR9gkXPjfAeAQ9AADACCQyAwAA2IeRHgCIAVanIu2etjdyCtQjuVO8boGHmN4CAABGcGntLYIeAADgLXJ6AAAA7MNIDwAA8BY5PQAAwAgEPQAAwAgkMp/JaqVlr5h4a6fVWyyj/bODOSLti5FWuQYQvWIq6AEAAHGIu7cAAECs+emnn3T99ddrwIABuuyyy7R48eKWD6oPeprabMJIDwAAsE379u31/PPPa9CgQaqsrFRWVpZGjRqlSy+9tOmDGOkBAACx5sILL9SgQYMkSSkpKRowYIAOHjzocatOYaQHADzk9/stPe93i+d7NMZuqDjwzz8f9bQVzkrrYu15i/7P4gkt9JmSkhKLJ3NWWVmZdu3apSFDhjT/RO7eAgAAsaqqqkrjxo1TUVGRzj333OafTJ0eAIh/Vq/I47UkRv0Iz0JPW+Gs3NE2n3B5ic0ntF9NTY3GjRunSZMm6ZZbbmn5AHJ6AABArKmrq1N+fr4GDBigBx980OvmNEDQAwAAbLNz506tWLFCO3bsUGZmpjIzM7Vly5bmDwqJW9adFq/DxW6yWt3WauVmy5bXtfycqQ5/vlba0Eb0Ufvl1jn/uQEmGzZsmOoi/Z6RyAwAAIxATg8AAIB9GOkBAADe4pZ1AABgBIIeAABgBJcSmcnpAQAARoiKkR67156JRfG+/ozlNWWsstJnSm1+zda0oY2ipc/HU/9c5MLnVi8zM1NFRUWuvZ6p7C5DYHepCM9Ke8SSlqa3bIpWoiLoAQAABjMp6DF97Rkp/tef8WTtGceLE1poQxtFS5+Pp/6ZGyWrTwM4TUtBj8+el4mKoMcrVodEo+WHJ5Z5MrwbacVkh4Mk+hEAeMvooAcAAEQBlqEAAABGoE4PAAAwAmtvAQAA2IeRHgAA4C2mtwAAgBFIZAYAAEZgpAcAABiBoAcAECu8LPZq9Zx2r9FlleWiq5EWVEXEjA56TKyQSxVqxBNXfsQcX86EHzrApZQes4MeAADgPZdmtwh6AACAt9wKeihOCAAAjMBIDwAA8BTTWwAAwAgkMgMAACOQ0wMAAGAjRnoAAICnyOkBAABGMCvocbriqQHsrkxrd+XmuCzDHmG/bc1nRGVsACYIiURmAMA/rF44bHnT2Xa01X+D/0V+/6nHS0oaPO7lGl1WxeXFXJwj6AEAAJ4ya3oLAAAYi1vWAQBAzLnrrrvUuXNnXX755ZaPqQ96mtrsQtADAABsk5eXp0Ag4HUzGkXQAwAAbDN8+HClpaVFdEz9MhRNbXYhpwcAAHiKRGYAAGAEEpkBAABsxEgPAADwlFnTW1arVb5JSX7XWFxiwXJF0lgQadVUF5ZPiXTpilhftsLu5VQ8QfVdGG7ixIkqKSnR0aNH1aNHD82bN0/5+fnNHlOfyOy06Ah6AABAXFizZk3Ex5DTAwAAYCNGegAgjtg95ezVAqaRTHWykGjsMyunBwAAGIugBwAAGMGtRGZyegAAgBEY6QEAAJ5iegsAABiBoAcAABiBoKcR0V6t1fbbJp14vy5UEW5UPN7a6cZ7ivDzcrqCc1xUiI70OxCPfRcwVEwFPQAAIP6ExDIUAADAAExvAQAAIxD0AAAAIxD0AAD+ZXdCtcWEbsvrULX2JonSNh4v+9cbI3k9fhH0AAAAT7m1DAVBDwAA8BTTWwAAwAhuBT0sOAoAAIwQWyM9NlcT3vKmtedZrULblgrKi/z+U+coKfn3Qa+qJ0sk8sUqhyo41/dPpys4R6w13xH6NhB1mN4CAABGIJEZAAAYgZweAAAAGzHSAwAAPEVODwAAMALTWwAA5yyvkxYf8roVgKR/E5mb2uwSWyM9Nt9qmrvc1tMBgOsqKip0//33a+vWrZKkGTNmaO7cueH9Tz75pDZs2KD9+/drzpw5DfYptau7jfUa5QqMF1tBDwCggQceeEAnTpxQWVmZjhw5ohEjRqhnz5668847JUm9e/fWokWL9Morr3jcUqBpTG+1wvr16zV06FB17NhR/n+KqZ1u2rRp6tevn9q1a6dly5adsf/AgQMaM2aMUlJSlJ6ertmzZzvfaMScQ4cO6aabblK3bt2UkJCgsrKyBvvz8vKUlJSk5OTk8BYMBiVJX3/9ta666ip16tRJnTp10siRI/X111978C4QLdatW9egr3To0KHRv19N2bx5s2bPnq2OHTuqV69eys/P1xtvvBHeP3XqVOXk5CglJcWB1gP2qA96mtrsElcjPWlpaSosLFRpaal27Nhxxv4rr7xS48eP1yOPPHLGvpMnT2rUqFGaOXOm1q1bp8TERH377bfONLSxKrKljexjKDYqtWvXTtnZ2Xrsscc0dOjQRp8ze/ZsPf3002c83q1bNxUXF6tnz54KhUJ68cUXNWHCBH311VeNv5jTfcBqReN/+mfuFIfOb7Dx48dr/PjxkqRjx45pyJAhmjhxohYuXKiFCxc2eVxFRUX43+tOq3xdV1envXv3Otdgm2Wmed0CRIOWRnqSbHqdqAl6nnvuOX3yySd6++23w4/NmjVLiYmJKioqsnSOkSNHSpJef/31RvfPnDlTknT22WefsW/ZsmXq1q2bHnzwwfBjGRkZltvfVnzxnfHDDz9o8ODB2r59uwYNGqSff/5ZGRkZKi4ujuhq+nRdunTRjBkzVFtbG/GxqampSk1NlXTqxykxMVHff/99q9rhJvqn80KhkG6//Xb5/X7dc889kqRHH320xeOys7O1cOFCLV++XL/88oveeOMNnThxwunm2qZosNctgEmiZnrrjjvuUCAQCF+91NbWat26dZo8ebJmzJgR/rH472ZXYPLJJ5+oV69eysnJUXp6uvx+v/bs2WPLua0oGsyX3wmXXHKJnn32WU2aNEknTpzQnXfeqby8PPn9fkf71UsvvaS0tDRlZWU1COTrpaam6uyzz9asWbP0+OOPt+m13ED/dN4TTzyhyspKLVmyJKLjlixZIp/Ppz59+mjs2LGaOHGievTo4VArAWeE5M7dW1ET9Fx44YUaPny43nrrLUlSIBBQenq6srKy9NJLL6mioqLRrclpgQiVl5dr7dq1uu+++/Tzzz/rxhtv1NixY3XypBurgcBJBQUF6tOnj4YMGaJDhw5p/vz5kuRYv7rvvvv03Xff6ciRI3rqqaeUl5ennTt3NnhORUWF/vzzTy1dulQDBw5s0/tD7Fu7dq3WrFmj4uJinXXWWZKkZ555pkGuz3+3emlpaVq1apUOHz6sffv2KRQK6eqrr/bqrQCt4lZOT9QEPdKphLuVK1dKklauXKnJkye79to+n0/Dhg1TTk6OkpKS9NBDD+m3337T/v37XWsDnFNQUKC9e/dq1qxZ6tChg+XjPvroo/CPzGWXXWbpmEGDBun8889X+/btlZubq0mTJumdd94543nnnHOOpk+frilTpujIkSOW24T4smvXLs2aNUsbNmzQBRdcEH788ccfV1VVVZNbvR9++EG//fabgsGgtm7dqldffVVz5swJ76+pqVF1dbVCoZBqa2tVXV0dTqwHooWRQc/NN9+sr776Snv37tW7776rSZMmSZKmT5/e5NWO1R+ilmRkZCghgaTLeFRVVaXCwkLl5+dr7ty5+v333yVZ61fXXntt+Edm3759rXr9hISEBommpwuFQjpx4oQOHjzYujeHmLdx40b98ccfGjZsWLj/5eTkWD7+iy++0BVXXKGUlBQ99thjWrVqVYO/iwUFBfL5fFqzZo3mz58vn8+nFStWOPFWgLBAIKB+/fqpd+/ezSbkuy2hrqm/xh4pKCjQp59+qvT09EbvwGpOMBhUTU2Nli1bptWrV+v9999XYmJieLj45MmTCoVCGjFihPLy8jR58mQlJSWpXbt2+uabbzRw4EBt2rRJ119/vZYsWaKlS5dq//79SkqyK2/8H1bvaOHuLVvk5+ersrJS69ev17Rp01RRUaH169e36Zz1V8vJyckqLS1Vz549wwnyxcXFys7OVseOHbV9+3aNGzdOmzdvlt/v17Zt25Senq6MjAwdP35cc+bMUXFxsQ4cONBogr3jTLy7iu9VQyb1AT57VwSDQfXt21fbtm1Tjx49NHjwYK1Zs0aXXnppk8eclZCg9GbO2T0rS59//nmb2xZVIz3SqSmuPXv2tGpqa8WKFfL5fLr33nv10UcfyefzqaCgILz/hhtukM/n08cff6xp06bJ5/Ppww8/lCT169dPK1eu1PTp09WpUydt3LhRmzZtsj/ggas2btyoQCAQLsz2wgsv6Msvv9SqVavadF6fzxfOq+jfv798Pl943+LFi9W9e3elpqbq4Ycf1muvvRa+U6yiokITJ07Ueeedp0suuUTff/+9AoGANwEPADjgs88+U+/evXXxxRcrKSlJEyZM0MaNG5s9xq1lKKJupOfHH39U//79dfjwYZ177rleN8cZjPQgWph0lV+P71VDJvUBPntXFBcXKxAIhMvHrFixQp9++qmWLl3a5DHZ2dk6evRok/vT09MVCATa3LaoqdMjncpveOGFFzRhwoT4DXgAIJoQCMBmjY2ltJQza0dAY0XUBD3Hjx9Xly5d1LNnT9fevGf4I4NoQV8EYLMePXrop59+Cv93eXm5unXr5mGL/hV101sAACB21dbWqm/fvvrggw/UvXt3DR48WKtXr7btbuu2iJqRHgAAEPvat2+vpUuXavTo0QoGg7rrrruiIuCRGOkBAACGiLpb1gEAAJxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIxA0AMAAIzw/1E3+m0BzqobAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 525.6x187.2 with 5 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "## Prediction visualisation\n",
    "import nibabel\n",
    "from matplotlib import pyplot as plt \n",
    "import numpy as np\n",
    "from nilearn import plotting\n",
    "import plotly.plotly as py\n",
    "import plotly.graph_objs as go\n",
    "\n",
    "# Before \n",
    "org = nibabel.load('/data/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_23/truth.nii.gz')\n",
    "\n",
    "\n",
    "plotting.plot_stat_map(org,threshold='auto')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<nilearn.plotting.displays.OrthoSlicer at 0x7fcc43429d30>"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAj0AAADeCAYAAADW3rEEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAGGlJREFUeJzt3X9s1PUdx/HXXa/tXX/xY1ALFle0GXQFdrMCgRWsjQo4MCAK5YelWH6FDewWoyQuA0YUtmUKzBRwiop1oKDjl9AFQrogDpyB4oA4p9hI/THsaKVHe73r3e2P5m4U6A/get+23+cj+UZ6/d7d+8vF8urn8/58P5ZAIBAQAABAN2c1ugAAAIBIIPQAAABTIPQAAABTIPQAAABTIPQAAABTIPQAAABTIPQAAABTIPQAAABTIPQAAABTIPQAAABTIPQAAABTIPQAAABTIPQAAABTIPQAAABTIPQAAABTIPQAAABTIPQAAICw8/l8+vGPf6yJEycaXUoIoQcAAITdunXrlJGRYXQZzRB6AKAbKCoqUlFRkdFlAJKkyspKvfvuu5o3b57RpTRjM7oAAMDNKy8vN7oEIKSoqEi/+93vVFtb2+a548ePV1VVVavn9OnTR6WlpTddF6EHAACEzd69e5WcnKysrCyVlZW1eX5VVZU+/PDDVs+56667wlIb01sAcA1paWk6ePCg0WWgg6WlpcnhcCghIUEpKSkqKCiQy+Uyuqwu7ciRI9q9e7fS0tKUl5enQ4cOafbs2a08IyDJ3cYRHoQeAICp7dmzRy6XS+Xl5Tpx4oRWr15tdEld2urVq1VZWamKigpt27ZNubm5KikpaeUZfkUq9DC9BQCApJSUFI0bN47+qIgLhp6Ox0gPAABqWnG0f/9+paenG11Kt5GTk6O9e/caXUYIIz0AAFObPHmyLBaLXC6XcnNztXLlSqNLMplgT0/HY6QHAGBqO3fuVG1trcrKyvTxxx+3uXwa4eaX1NDGER6EHgAAJN19990qKCjQE088YXQpJhO51VtMbwFAC7xer9zu///Atdlsstn4sdmdFRUVKS0tTeXl5XI6nUaXgzBjpAcAWvDAAw/I4XCEjhUrVhhdEjpY3759lZ+fr1WrVhldiomwZB0ADFVRUWF0CYiAa33OGzZsiHwhpha5JeuEHgAAYCBWbwEAAIQVIz0AAMBATG8BAABTiNz0FqEHAAAYiL23AAAAwoqRHgAAYKDgNhQdj9ADoFvJyckxugRDlJeXSzLv9XdWZWVlRpfQBdDTAwAATIHVWwBwQ8z6m3VwhMes1w+0B6EHAAAYiOktAABgCkxvAQAAU+A+PQAAAGHFSA8AADAQPT0AAMAUTNbTs89iCf35gUDAwEoAAEBkBRSpOzLT0wMAAEyhU4z0AAAAszLZ9BZTWgAAmJXJQg8AADArVm/hJhQVFUmS1q5da3Al6Ch8xgC6D0Z6cBPKy8uNLgEdjM8YAK5fl1y9lZaWpoMHDxpdRpeWlpYmh8OhhIQEpaSkqKCgQC6Xy+iyAACmE5zeau0Ijy4ZehAee/bskcvlUnl5uU6cOKHVq1cbXRIAwHSC01sdH3qY3oJSUlI0btw4pkwAAAZoT0+PIyzvxEgPVFlZqf379ys9Pd3oUgAA6DCEHhObPHmyEhMTNWDAACUnJ2vlypVGlwQA6OLcbrdGjBihH/3oR8rMzNTy5cvbeEZwG4rWjvAg9JjYzp07VVtbq7KyMn388ceqqqoyuiQAQBcXGxurQ4cO6eTJkyovL1dpaamOHj3ayjMi19ND6IHuvvtuFRQU6IknnjC6FABAF2exWJSQkCBJ8nq98nq9sly2sfjVWL3VJq/XK7fbHToaGxuNLqlLKyoq0oEDB2hmBgDcNJ/PJ6fTqeTkZN13330aOXKk0SVJ6sKh54EHHpDD4QgdK1asMLqkLq1v377Kz8/XqlWrjC4FANDFRUVFqby8XJWVlfrggw906tSpVs5myXqrKioqjC6hy7vW3+GGDRsiXwgAoNvq2bOncnJyVFpaqiFDhrR8os8XkXq67EgPAADofL799lvV1NRIkurr63Xw4EENHjy45Sf4JXnaOMKkS470AACAzunrr7/WnDlz5PP55Pf7NW3aNE2cONHosiQRegAAQBgNGzZMJ06caP8TApK8HVZOM4QeAABgHEIPAAAwhQiGHhqZAQCAKTDSAwAAjBNQWFdotYbQAwAAjENPDwAAMAV6egAAAMKLkR4AAGAcprcAAIAp0MgMAABMgZ4eAACA8GKkBwAAGIeeHgAAYAqEHgAAYAoRbGSmpwcAAJgCIz0AAMA4TG8BAABTIPQAAABT4D49AAAA4cVIDwAAMI5fbEMBAABMgJ4eAABgCoQeAABgCjQyAwAAhBcjPQAAwDhMbwEAAFOI4N5bhB4AAGAcenoAAADCi5EeAABgHHp6AACAKRB6AACAKUSwkZmeHgAAYAqdYqQnJyfH6BK6lfLyckn8vXZnnekzdjqdWrt2rdFlAOiqWL0FAAC6onPnzumee+5RRkaGMjMztW7dutafEAw9rR1h0ilGesrKyowuoVsJ/vbP32v3xWcMoLOy2Wz6wx/+oDvvvFO1tbXKysrSfffdpx/+8IfXfgIjPQAAoCvq16+f7rzzTklSYmKiMjIy9OWXXxpcVZNOMdIDAAC6n4qKCp04cUIjR45s+SS2oQAAAF2Zy+XS1KlTtXbtWiUlJbV8IvfpAYAbNMfy/z+/FjCuDsDEvF6vpk6dqlmzZumhhx5q/WR6egAAQFcUCARUWFiojIwM/fKXvzS6nGYIPQAAIGyOHDmi119/XYcOHZLT6ZTT6dS+fftafoJf5lqyDgBhw5QWYKjs7GwFAtfx/yGNzAAAwBTo6QEAAAgvRnoAAIBxWLIOAABMgdADAABMIYKNzPT0AAAAU2CkBwAAGKc901thSiuEHgAAYBxCDwAAMIX2hB5HeN6Knh4AAGAKjPQAAADjsA0FAAAwBe7TAwAATIG9twAAAMKLkR4AAGAcprcAAIAp0MgMAABMgZEeAABgCjQyAwAAhBcjPQAAwDARbOkh9AAAAONEcHaL0AMAAIwTydBDTw8AADAFRnoAAIBhmN4CAOAGrF+/XoFAQJL0+OOPG1wN2oNGZgBAt/bCCy9c9VgwrCxZsuS6Xmvjxo2SJKvVqtjYWHm9kRo3QDgw0gMA6LbWr18vh8MhSYqOjpbValUgEJDP55MkFRcXa/HixW2+zqZNmxQXF6ekpKTQYz6fT263u2MKR5dH6AEAAIZh9RYAoNuKiYlRbGysYmNjFRcXp/j4eCUkJCg+Pl7x8fGy2+1tvkZxcbHi4+MVFxcnh8Mhh8Oh2NhYxcTEhI5rTaGh8wmGntaOcCH0AAAiymazhYJJMPhcHl5iYmJCfTotuTzcBANUbGysbDaboqKiFBUVpejo6AhdEW6GX02NzK0d4cL0FgAgoqKiomSzNf3zExMTI7vdLqvVqoaGBklSQ0OD6uvrW32Ny4OT1dr0+7vX65XFYgl9HfwvEEToAQAAhqGnBwDQbfn9fvl8Pvl8PlksltCoTXB6Kz4+XjExMXrxxRdbfA2bzRbq4QlOZ/n9fnm93tDh9/sjeFW4UfT0AAC6rbq6OtXW1qq2tlYul0sNDQ3y+Xyy2WzNwkxwCuxaoqOjZbPZZLVa5ff75ff71dDQIJfLFXrthQsXRvCqEPTYY48pOTlZQ4YMadf5kQw9TG8BACJqyZIlWrt2rSSFAkuPHj0UGxsbeqylfpyXXnpJkpSYmNgs6EhSTU2NCgsLI3AFaE1BQYF+/vOfKz8/3+hSrkLoAQBETHCbCIvFIqmpafnChQtqaGhQXFycJMliscjj8eixxx676vnz5s2TJJWUlMjlcsnj8ai2tlaSVF9fr+eff16/+MUvInQ1uJaxY8eqoqKi3eezDQUAADAFtqEAAHQrweksu90uu93erF+nsbFRbrc7tGTdYrGosbGx1derr6+Xx+MJNUNLUlJSkqxWq1555RVJTUvY3W63li5d2hGXhDAh9AAAuiWLxSK73a4ePXpIagpBFotFbrdb3333nSSptra2zU1DvV6vbDabevXqpfj4eEkK3esneI+fS5cuhQIRIHWj1VtvvfWWRo8erbi4OOXk5DT7XlVVlX7yk5/oe9/7nnr27KlRo0bpyJEjoe8HAgH96le/0q233qoePXooJydHp0+fjvAV4Ep//OMfNXDgQCUlJemuu+7Se++91+z7x48f19ixY5WQkKBbbrlF69atM6hSAG0JNix7vV55PB4FAgEFAgE5HA716tVLt956qwYOHKiBAwcqJSUl1N/TErvdrr59+6p///7q3bu3evfuLZvNpoaGBtXV1amurk5erze0czs6L5as34DevXurqKhIy5Ytu+p7CQkJ2rx5s7799ltVV1frqaee0qRJk0LDp9u3b9fmzZt1+PBhXbhwQaNGjdKjjz4a6UvAZY4dO6Zly5Zpx44d+u6771RYWKgpU6aEdmGuqqrS+PHjtXDhQv33v//Vp59+qvvvv9/gqgEAM2bM0KhRo/Svf/1Lqampevnll1s9P9jIHIltKDpF6Pn973+vqVOnNntsyZIlKioqavdr3HvvvZo2bZr69+9/1ffsdrsGDRokq9WqQCCgqKgoVVdX68KFC5Kkzz//XNnZ2br99tsVFRWl2bNn68yZMzd3USby2WefqXfv3jp+/Lgk6auvvlKfPn1UVlZ2w69ZUVGhzMxMZWVlyWKxKD8/X1VVVTp//rwk6bnnntO4ceM0a9YsxcbGKjExURkZGeG4HAAdIHgPnuDWEcGvbTaboqOjQ/8fJyYmqk+fPkpKSlJJSUmLrxcXF6ekpCTZ7fbQzQmlptVgly5d0qVLl+TxRGpNEC63detWff311/J6vaqsrGzzNgKmG+mZPXu2SktLVVNTI6mpqe3NN9/Uo48+qsWLF6tnz57XPIYNG3Zd7zNs2DDZ7XY9+OCDmjdvnpKTkyVJeXl5+vTTT/XJJ5/I6/Xqtdde0/jx48N+nd3VHXfcod/+9reaNWuW6urqNHfuXBUUFCgnJ+eGP78JEybI5/Pp2LFj8vl82rx5s5xOp1JSUiRJR48eVe/evTV69GglJydr0qRJ+uKLLyJ1yQCuk9VqldVqVUxMTLPNRYNhJTjdFVzOHgxDLQnemNBisYRCT3DH9ss3I2X/LVyuUzQy9+vXT2PHjtX27ds1f/58lZaWqk+fPsrKylJWVpaKi4vD8j4fffSR3G63/vKXvzT7DaBfv34aM2aMBg0apKioKA0YMECHDh0Ky3uaxfz587Vnzx6NHDlSFotFu3fvliQVFxff0OeXmJioqVOnKjs7W4FAQD179tT+/ftDTYmVlZU6fvy4Dhw4oKFDh+rJJ5/UjBkzmvVqAeg8gltCBAPN5WGnsbFRfr8/9HO5vr5ejY2NoXOuJRAIhLayCPL5fIqKigrd5DC4HQU6N1PuvTVnzpzQUGZJSUmH9dTY7XbNmDFDa9as0cmTJyVJK1eu1D/+8Q+dO3dObrdby5cvV25ururq6jqkhu5q/vz5OnXqlJYsWRL6odMehw8fVkJCghISEpSZmSmp6a6rmzdv1unTp+XxeFRSUqKJEyfqq6++kiQ5HA5NmTJFw4cPl91u1/Lly/X++++HVn8A6FyWLl2qpUuXhoJKY2OjGhsb5fF45Ha75XK5VF1dHWo9cLvdrW5D4fV6Qw3LbrdbbrdbXq9XVqtV0dHRio6Ols/nI/R0Aaab3pKkyZMn66OPPtKpU6e0d+9ezZo1S5K0aNGi0D+IVx7BfyBvhNfr1dmzZyVJJ0+e1PTp05WamiqbzaaCggJVV1d32b4ep9Mpp9MZ0fd0uVwqKipSYWGhVqxYEeqXas/nN2bMGLlcLrlcrtCquZMnT2rSpEn6wQ9+IKvVqvHjx6tfv356//33JTVNVV6+FDX4Z7Os1DDiMwaAjhDJRuZOMb0lNY3APPzww5o5c6ZGjBih2267TZK0ceNGbdy4sc3nBxN9cJjU7XYrKipK0dHROnr0qBobGzVixAj5fD6tX79e//nPfzRy5EhJ0vDhw7V9+3bl5eWpb9++euONN+T1epWent6h19xRgjcB6yj7rrjvxQOBgB5//HFlZWXppZde0oIFC7Ro0SK99dZb7f78rjR8+HA988wzWrJkiQYOHKiDBw/qk08+CW1gN3fuXE2dOlVLly5VZmamVq1apezsbPXs2TMs19jZdfRnfMPmXHFPlNfMEULRfsEl68ERmGDPjcfjCf2yVFtbe80tKC7X2Niompoaeb3eZvfpCW5EGsSWFLhcpwk9UtMUV3Ba43q9/vrrmjt3buhrh8OhOXPm6NVXX1VDQ4OWLl2qs2fPKjo6WkOHDtW7774bWun11FNP6fz583I6nbp06ZLS09P19ttvm+Yf0Ju1a9culZaW6p///KekppVVTqdTb7zxRmjE7nrl5+frs88+U05Ojqqrq5WamqpNmzZp8ODBkqTc3Fw9++yz+ulPf6q6ujplZ2frz3/+c9iuCUDHWLhwoUpKSkJT4BaLRVarVV6vV4888ki7Xyc/P18vv/yyGhsbQyO9sbGx8ng8oduRXN7vg84rkj09lkAnmg/44osvNHjwYH3zzTdKSkoyuhy04FojPYAkRnoMFLwp683cKiJSXnzxRfXq1UuSFB8fL5vNJo/Ho4kTJ17X6wS3mwiO9ERHR8vj8ejixYuSmvoM0fmlWiz6WRvnvJ2VpQ8//PCm36vTjPT4/X4999xzysvLI/AAAGASptt769KlS7rlllv0/e9/X6WlpUaXgzYwsoMWMbKDdliwYIH+9Kc/SWrqzYmNjQ0tab8ec+fO1auvviq32y1JoVVcCxYsCGu96D46ReiJj4+Xy+UyugwAQIQEp56Ki4vlcDhaXZ7emoKCAm3atElSU78Quh6/wrtCqzWdIvQAAMxp8eLFknRDqzyDCDtdm+mmtwAA5rZo0SKjS4BBCD0AAMAUTLkNBQAAQEdipAcAABgmuA1FJBB6AACAYejpAQAApkBPDwAAQJgx0gMAAAzD9BYAADAFGpkBAIAp0NMDAAAQZoz0AAAAw9DTAwAATIHQAwAATCGSjcz09AAAAFNgpAcAABiG6S0AAGAK7Qk9ljC9F6EHAAAYpj2hJyZM70VPDwAAMAVGegAAgGH8anv1VrhGegg9AADAMDQyAwAAU2DvLQAA0GWVlpZq0KBBSk9P15o1a4wuJ4TQAwBXmDBhghISEkJHTEyMhg4dGvp+eXm5xowZox49eig1NVW/+c1vDKwW6Fx8Pp9+9rOfaf/+/Tpz5oy2bt2qM2fOtHh+cKSntSNcCD0AcIX9+/fL5XKFjtGjR+uRRx4JfX/mzJkaO3asLly4oL/97W/asGGDdu/ebWDFQOfxwQcfKD09XbfffrtiYmKUl5enXbt2tXh+cBuK1o5woacHQLfz5ptvqrCwMPS11+vVqFGjVFZWdt2vVVFRocOHD+uVV15p9tisWbMUFRWlO+64Q9nZ2Tp9+rQefPDBcJR/Q5xOp2HvDVzuyy+/1IABA0Jfp6am6tixYy2ef++4caqqqmr1Nfv06ROW2gg9ALqd6dOna/r06ZKkixcvauTIkZoxY4bWrFnTan9BTU3NVY9t2bJFY8aM0cCBA0OPFRUVacuWLVq1apXOnj2rv//973ryySfDfyHXYe3atYa+PxAUCASuesxiafmeyqWlpR1ZTjNMbwHotvx+v2bOnKmcnBwtXLhQy5YtU01NTYvHtWzZskUFBQXNHps4caJ27Nghh8OhwYMHq7CwUMOHD4/AFQGdX2pqqs6dOxf6urKyUv379zewov8j9ADotp5++mnV1tZq/fr1N/T89957T998840efvjh0GMXLlzQ+PHj9etf/1put1vnzp3TX//6VxUXF4erbKBLGz58uP7973/r888/l8fj0bZt2wyd+r0coQdAt7Rt2zZt3bpVO3bsUHR0tCTp2WefbbYq68rjSq+99poeeuihZt87e/asoqKilJ+fL5vNptTUVOXl5Wnfvn0RuzagM7PZbHrhhRc0btw4ZWRkaNq0acrMzDS6LEmSJXCtyTcA6MJOnDih+++/XwcOHLjhBt/6+nr169dP77zzjnJzc0OPX7x4UbfddpuKi4uVl5en8+fPa8qUKcrNzdUzzzwTrksA0AEY6QHQ7ezatUvV1dXKzs4OjeJMmDDhul5j586d6tGjh+65555mjyclJemdd97R888/r169esnpdGrIkCF6+umnw3kJADoAIz0AAMAUGOkBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACmQOgBAACm8D+7cGV38qSuZQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 525.6x187.2 with 5 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import nibabel\n",
    "from matplotlib import pyplot as plt \n",
    "import numpy as np\n",
    "from nilearn import plotting\n",
    "import plotly.plotly as py\n",
    "import plotly.graph_objs as go\n",
    "\n",
    "# Before \n",
    "org = nibabel.load('/data/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_23/prediction.nii.gz')\n",
    "\n",
    "plotting.plot_stat_map(org,threshold='auto')\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "import nibabel\n",
    "from matplotlib import pyplot as plt \n",
    "import numpy as np\n",
    "from nilearn import plotting\n",
    "import plotly.plotly as py\n",
    "import plotly.graph_objs as go\n",
    "\n",
    "# Before \n",
    "org = nibabel.load('/data/home/vjain/notebooks/3DUnetCNN/brats/prediction/validation_case_11/prediction.nii.gz')\n",
    "\n",
    "plotting.plot_stat_map(org,threshold='auto')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import nibabel\n",
    "from matplotlib import pyplot as plt \n",
    "import numpy as np\n",
    "from nilearn import plotting\n",
    "import plotly.plotly as py\n",
    "import plotly.graph_objs as go\n",
    "\n",
    "# Before \n",
    "org = nibabel.load('/data/home/vjain/notebooks/3DUnetCNN/brats/v_1_50/prediction/validation_case_11/prediction.nii.gz')\n",
    "\n",
    "plotting.plot_stat_map(org,threshold='auto')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python (unet)",
   "language": "python",
   "name": "unet"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
